Mercurial > boosterpack
view Rule.pm @ 10:3b52ac950753 boosterpack tip
going to try to fix this thing
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 27 Sep 2010 17:24:06 -0400 |
parents | 8c6d2ce90677 |
children |
line wrap: on
line source
1 #!/usr/bin/perl3 package Rule;4 use List::Util qw(first max maxstr min minstr reduce shuffle sum);6 sub new7 {8 my $class = shift;10 my $hashREF =11 {12 _rarity_map => {"Rare" , 1 , "Uncommon" , 3 , "Common" , 6},13 _sets => ("Base Set")17 };19 $objectREF = bless($hashREF, $class);21 return $objectREF;23 }26 sub getRarityMap { return @_[0]->{'_rarity_map'}; };27 sub getSets { return @_[0]->{'_sets'}; }30 sub setRarityMap { $_[0]->{_rarity_map} = $_[1]; }31 sub setSets { $_[0]->{_sets} = $_[1]; }34 1;