NAME
Games::Bingo::Print::Plate - Bingo plate class for PDF generation
SYNOPSIS
use Games::Bingo::Print::Plate;
my $p = Games::Bingo::Print::Plate->new();
$p->populate();
DESCRIPTION
This Games::Bingo::Print::Plate class (Plate for now) is a simple holder used to hold the generated bingo plates before they are printed.
METHODS
- new
-
The constructor, takes no arguments.
- populate
-
This method is the main method of the class. It populates the object with a plate of 12 random numbers which can be printed using the Games::Bingo::Print class.
- _init
-
Init uses the function in Games::Bingo::Column and Games::Bingo::ColumnCollection, which are use to generate the necessary random numbers to generate the plate and set the them in the necessary columns.
- _populate
-
This is the private method which is used to populate the plate in the Plate class.
Populate takes to arguments, the row and the number, it resolves the column using _resolve_column.
- _resolve_column
-
Resolve column is method used to resolve where on the plate a specified number should go. It takes a number and returns an integer indicating a column.
- _integrity_check
-
This method is a part of the work-around, which was made in the populate method, it checks whether the populated Plate holds 12 numbers return a boolean value indicating succes or failure.
BUGS
This class contains a bug in populate, which is regarded a design flaw. A work around have implemented. No other bugs are known at the time of writing.
SEE ALSO
AUTHOR
jonasbn <jonasbn@io.dk>
COPYRIGHT
Games::Bingo and related modules are free software and is released under the Artistic License. See <http://www.perl.com/language/misc/Artistic.html> for details.
Games::Bingo is (C) 2003 Jonas B. Nielsen (jonasbn) <jonasbn@io.dk>