Mercurial > boosterpack
comparison Rule.pm @ 2:d7dd496a4fa6 boosterpack
[svn r4] actual functionality!
author | robert |
---|---|
date | Tue, 08 Sep 2009 02:45:26 -0400 |
parents | |
children | 8c6d2ce90677 |
comparison
equal
deleted
inserted
replaced
1:c702488ef795 | 2:d7dd496a4fa6 |
---|---|
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; |