Games::Score

Games::Score is a Perl module to keep track of score in games .
Download

Games::Score Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jose Castro
  • Publisher web site:
  • http://search.cpan.org/~cog/Acme-AsciiArt2HtmlTable-0.01/lib/Acme/AsciiArt2HtmlTable.pm

Games::Score Tags


Games::Score Description

Games::Score is a Perl module to keep track of score in games . Games::Score is a Perl module to keep track of score in games .SYNOPSIS use Games::Score; # these three values are the default ones, by the way Games::Score->default_score(0); Games::Score->default_step(1); Games::Score->step_method('inc'); # start two players my $player1 = Games::Score->new(); my $player2 = Games::Score->new(); # set a winning condition Games::Score->victory_is( sub { $_ >= 20 } ); # and something to do if it is achieved Games::Score->on_victory_do( sub { print "Won!" } ); # give points to the players $player1->add(2); $player2->step(); # look at section FUNCTIONS for more functionalities, such as Games::Score->invalidate_if( sub { $_ > 20 } );Games::Score can be use to keep track of several players' points in a game, regardless of the starting amount of points, winning and/or losing conditions, etc.It provides several useful methods so that the user doesn't have to keep testing values to see if they're valid or if the player condition has changed. Requirements: · Perl


Games::Score Related Software