Help for this page

Select Code to Download


  1. or download this
    my @cards = (
        {
    ...
            cost=>{ air=>2, electricity=>4 },
        },
    );
    
  2. or download this
    my @players = (
        {
    ...
            mana =>{ water=>5, frost=>10 },
        },
    );
    
  3. or download this
    sub can_cast {
        my ($rPlayer, $rCard) = @_;
    ...
        # Nothing rejected, so we can cast it!
        return 1;
    }
    
  4. or download this
    $ cat mana.pl
    use strict;
    ...
    $ perl mana.pl
    Joe can cast: Fireball Lightning bolt
    Audrey can cast: Ice wall