GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GAMES::BINGO::COLUMN (3)

.ds Aq ’

NAME

Games::Bingo::Column - a column class used for generating bingo cards

CONTENTS

SYNOPSIS



        my $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();



DESCRIPTION

The Column is used when building the bingo cards and is a temporary data structure.

The class has two attributes:
o _array

<B>_arrayB> is a list of numbers for containment in the class, since the class actually is nothing but an array with a status flag.

o label

The label being the group to which the numbers in the array belong.

METHODS

    new

The contructor optionally takes an array as an argument, and sets the <B>_arrayB> attribute to point to this.

    populate

<B>populateB> 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_number

The <B>get_highest_numberB> 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 <B>1B>. Default behaviour is not shrinking.

    get_random_number

The <B>get_random__numberB> 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 <B>1B>. Default behaviour is not shrinking. See also <B>get_highest_numberB>.

    _reverse

The method used by Perls sort to sort the list

    get_label

Accessor returning the label of the G::B::Column object.

    count_numbers

Returns the number of numbers contained in a G::B::Column object.

SEE ALSO

Games::Bingo
Games::Bingo::ColumnCollection

TODO

The TODO file contains a complete list for the whole Games::Bingo project.

ACKNOWLEDGEMENTS

My friend Allan helped me out with some of the algoritmic stuff and was in on the development when this class was thought up.

AUTHOR

Jonas B. Nielsen, (jonasbn) - <jonasbn@cpan.org>

COPYRIGHT

Games-Bingo is (C) by Jonas B. Nielsen, (jonasbn) 2003-2015

Games-Bingo is released under the artistic license 2.0

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 GAMES::BINGO::COLUMN (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.