Module: Games::WordFind.pm 0.02
Description: generate word-find type puzzles from a list of words.
history:
This module results from a one-off script I created some time ago
to generate word-find puzzles from my son's practice word lists
he received from school.
The design is perhaps sub-optimal, I've merely taken the
original one-off script and cobbled together a module out
of the puzzle generating bits, and added a couple things.
There is an included application script 'wordfind.pl' in the
examples directory.
Plain text puzzles and their solutions appear like:
Words to Find:
--------------
CAMEL GREAT LINUX
LLAMA PERL
W Z J I Q X D L R M
O K Z C S T E A O I
C Z V Z A M P Y I M
D Y P E A M D N I C
W R R C T T V L F J
A G W E L L R E P O
F M A W L I N U X I
A S A H Q R Q D U O
S G R L F O U C G N
V B Y B L K U F W I
Solution:
* * * * * * * L * *
* * * * * T E * * *
* * * * A M * * * *
* * * E A * * * * *
* * R C * * * * * *
A G * * * L R E P *
* M * * L I N U X *
* * A * * * * * * *
* * * L * * * * * *
* * * * L * * * * *
latex puzzles are similarly formatted in a tabular environment
with \huge letters.
html puzzles are formatted using a
and a larger font
<...size=+5>. I don't use html all that often, and only added
this so that those without latex could still produce large puzzles
and open and print them from their browser---it may not be a good
example of html code.
Install:
perl Makefile.PL
make
make install
ought to do it for the module. See below for using the
wordfind.pl example script.
please see the embedded pod in WordFind.pm and wordfind.pl
for documentation.
Examples:
To produce the above example:
#!/usr/bin/perl -w
use WordFind;
my @words = qw(linux perl camel llama great);
my $puzzle = WordFind->new({cols=>10});
$puzzle->create_puzzle(@words);
print $puzzle->get_plain({solution=>1});
__END__
The example directory contains two scripts:
simple.pl : a very simple example script which
demonstrates using the module to
produce two plain-text puzzles
wordfind.pl: a more elaborate script with embedded
documentation: allows various options and can
produce plain, latex or html formatted
puzzles.(see embedded pod for usage)
These example scripts have a C