diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/BoosterPack/Rule.pm	Mon Sep 27 16:57:26 2010 -0400
     1.3 @@ -0,0 +1,32 @@
     1.4 +package Rule;
     1.5 +use List::Util qw(first max maxstr min minstr reduce shuffle sum);
     1.6 +
     1.7 +sub new
     1.8 +{
     1.9 +	my $class = shift;
    1.10 +	
    1.11 +	my $hashREF = 
    1.12 +	{
    1.13 +		_rarity_map => {"Rare" , 1 , "Uncommon" , 3 , "Common" , 6},
    1.14 +		_sets  => ("Base Set")
    1.15 +		
    1.16 +		
    1.17 +		
    1.18 +	};
    1.19 +	
    1.20 +	$objectREF = bless($hashREF, $class);
    1.21 +	
    1.22 +	return $objectREF;	
    1.23 +	
    1.24 +}
    1.25 +
    1.26 +
    1.27 +sub getRarityMap { return @_[0]->{'_rarity_map'}; };
    1.28 +sub getSets { return @_[0]->{'_sets'}; }
    1.29 +
    1.30 +
    1.31 +sub setRarityMap { $_[0]->{_rarity_map} = $_[1]; }
    1.32 +sub setSets { $_[0]->{_sets} = $_[1]; }
    1.33 +
    1.34 +
    1.35 +1; 
    1.36 \ No newline at end of file