NAME
Games::Crosswords - Crosswords Game
SYNOPSIS
use Games::Crosswords;
$c = Games::Crosswords->new({TABLE => blah, LEXICON => blah blah});
$c->genpuzzle();
DESCRIPTION
This module helps users create crosswords and print output to a TEX file. Users can convert the TEX ouput to a ps or pdf file.
METHODS
new({TABLE => blah, LEXICON => blah blah})
To illustrate the parameters, it is better to use an example.
TABLE => <<BLAH;
@@@@.@
@@@@.@
@@....
@@@@.@
BLAH,
@ is for a block cell, and . for a blank one.
LEXICON =>
{
DOWN =>
[
[ 0, 4, 'The camel language', 'Perl' ],
],
ACROSS =>
[
[ 2, 2, 'The cool author', 'xern' ],
]
}
The first two indicate the y-th row and the x-th column. Both of them count from 0. Then, the hint follows. The last one is the answer which is not necessary unless users invoke gensolution.
table
Users may redefine the crosswords table.
lexicon
Users may redefine the lexicon data.
genpuzzle
Generates the puzzle. It prints the result to STDOUT unless given the file's name
gensolution
Generates the solution. It prints the result to STDOUT unless given the file's name
SEE ALSO
eg/puzzle.pl, eg/solution.pl
AUTHOR
xern <xern@cpan.org>
LICENSE
Released under The Artistic License