diff Rule.pm @ 2:d7dd496a4fa6 boosterpack

[svn r4] actual functionality!
author robert
date Tue, 08 Sep 2009 02:45:26 -0400
parents
children 8c6d2ce90677
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Rule.pm	Tue Sep 08 02:45:26 2009 -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