Games::Bettor - A class representing a bettor
Version 1.0
This class represents an individual bettor with a name, bankroll, betting method and history.
Perhaps a little code snippet.
use Games::Bettor; my $bettor = Games::Bettor->new( name => 'Connie', bankroll => 1000, method => Games::Bettor::Consistent->new( amount => 1 ) );
$bettor = Games::Bettor->new( name => $string, bankroll => $number, method => $ref_to_method ); Returns a new Bettor object. name: A human readable designation for this object. bankroll: The starting bankroll for this bettor. method: a reference to the betting method to use.
my $name= $bettor->name(); Returns the name associated with the Bettor object;
$bettor->log_result( result => [0|1] ); Alerts the Bettor object to the outcome of a paricular trial.
my $bettor_data = $bettor->report(); Returns a hash reference containing data on the run for a particular Bettor object. The data points returned are name, starting bankroll, ending bankroll and the trial history.
Troy Denkinger, <tdenkinger at gmail.com>
<tdenkinger at gmail.com>
Please report any bugs or feature requests to bug-games-bettor at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Games-Bettor. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-games-bettor at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Games::Bettor
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Games-Bettor
CPAN Ratings
http://cpanratings.perl.org/d/Games-Bettor
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Games-Bettor
Search CPAN
http://search.cpan.org/dist/Games-Bettor
Copyright 2006 Troy Denkinger, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Games::Bettor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::Bettor
CPAN shell
perl -MCPAN -e shell install Games::Bettor
For more information on module installation, please visit the detailed CPAN module installation guide.