Mercurial > rlmcintyre
comparison BoosterPack/Rule.pm @ 0:0d795f02a8bb tip
initial committ. what was I thinking?
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 27 Sep 2010 16:57:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0d795f02a8bb |
---|---|
1 package Rule; | |
2 use List::Util qw(first max maxstr min minstr reduce shuffle sum); | |
3 | |
4 sub new | |
5 { | |
6 my $class = shift; | |
7 | |
8 my $hashREF = | |
9 { | |
10 _rarity_map => {"Rare" , 1 , "Uncommon" , 3 , "Common" , 6}, | |
11 _sets => ("Base Set") | |
12 | |
13 | |
14 | |
15 }; | |
16 | |
17 $objectREF = bless($hashREF, $class); | |
18 | |
19 return $objectREF; | |
20 | |
21 } | |
22 | |
23 | |
24 sub getRarityMap { return @_[0]->{'_rarity_map'}; }; | |
25 sub getSets { return @_[0]->{'_sets'}; } | |
26 | |
27 | |
28 sub setRarityMap { $_[0]->{_rarity_map} = $_[1]; } | |
29 sub setSets { $_[0]->{_sets} = $_[1]; } | |
30 | |
31 | |
32 1; |