|
NAMEGames::Bingo::Column - a column class used for generating bingo cardsSYNOPSISmy $c = Games::Bingo::Column-E<gt>new(); foreach my $number(@numbers) { $c-E<gt>populate($number); } my @numbers = qw(1 2 3 4 5 6 7 8 9); my $c = Games::Bingo::Column-E<gt>new(@numbers); my $number = $c-E<gt>get_highest_number(); DESCRIPTIONThe Column is used when building the bingo cards and is a temporary data structure.The class has two attributes:
METHODSnewThe contructor optionally takes an array as an argument, and sets the _array attribute to point to this.populatepopulate is a simple accessor which can be used to add additional number to the list of number contained in the class. This is a secondary use of the class, please refer to the description of the algoritms used in the program described in the Games::Bingo class.get_highest_numberThe get_highest_number is also a simple accessor, it returns the highest number from the list contained in the class.If the optional parameter is set to true, it splices the list contained in the class, meaning the class shrinks by 1. Default behaviour is not shrinking. get_random_numberThe get_random__number is also a simple accessor, it returns a random number from the list contained in the class.If the optional parameter is set to true, it splices the list contained in the class, meaning the class shrinks by 1. Default behaviour is not shrinking. See also get_highest_number. _reverseThe method used by Perls sort to sort the listget_labelAccessor returning the label of the G::B::Column object.count_numbersReturns the number of numbers contained in a G::B::Column object.SEE ALSO
TODOThe TODO file contains a complete list for the whole Games::Bingo project.ACKNOWLEDGEMENTSMy friend Allan helped me out with some of the algoritmic stuff and was in on the development when this class was thought up.AUTHORJonas B. Nielsen, (jonasbn) - "<jonasbn@cpan.org>"COPYRIGHTGames-Bingo is (C) by Jonas B. Nielsen, (jonasbn) 2003-2015Games-Bingo is released under the artistic license 2.0
Visit the GSP FreeBSD Man Page Interface. |