The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Games::Keno

SYNOPSIS

This package plays a game of Keno. The number range is 1 to 80 and the payout amounts are for 1 to 10 spots.

Sample code to play 1000 draws with 5 spots. The spots are chosen for you.

 use App::Games::Keno;

 my $first_game = App::Games::Keno->new( num_spots => 5, draws => 1000 );
 $first_game->PlayKeno;
 say "You won \$"
   . $first_game->winnings . " on "
   . $first_game->draws
   . " draws.";

This is how you choose your own spots.

 my $second_game = App::Games::Keno->new(
   spots => [ 45, 33, 12, 20, 75 ],
   draws => 1000
 );
 $second_game->PlayKeno;
 say "You won \$"
   . $second_game->winnings . " on "
   . $second_game->draws
   . " draws.";

Several verbosity levels exist, use theme like this:

 my $third_game = App::Games::Keno->new(
   spots => [ 45, 33, 12, 20, 75 ],
   draws => 1000,
   verbose => 1
 );
 

Verbose level 0 is the default and prints nothing. Verbose level 1 prints the amount won on winning draws. Verbose level 2 prints evrything from verbose level 1 and the numbers drawn on each draw and the numbers that matched.