view 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
line wrap: on
line source
1 package Rule;
2 use List::Util qw(first max maxstr min minstr reduce shuffle sum);
4 sub new
5 {
6 my $class = shift;
8 my $hashREF =
9 {
10 _rarity_map => {"Rare" , 1 , "Uncommon" , 3 , "Common" , 6},
11 _sets => ("Base Set")
15 };
17 $objectREF = bless($hashREF, $class);
19 return $objectREF;
21 }
24 sub getRarityMap { return @_[0]->{'_rarity_map'}; };
25 sub getSets { return @_[0]->{'_sets'}; }
28 sub setRarityMap { $_[0]->{_rarity_map} = $_[1]; }
29 sub setSets { $_[0]->{_sets} = $_[1]; }
32 1;