Games::Maze is a Perl module used to create Mazes as Objects.
SYNOPSIS
use Games::Maze;
$m1 = Games::Maze->new();
$m2 = Games::Maze->new(dimensions => [12,7,2]);
$m3 = Games::Maze->new(dimensions => [12,7,2],
cell => 'Hex');
$m1->make();
$m1->solve();
print $m1->to_ascii();
print $m1->to_hex_dump();
%maze_attr = $m1->describe();
EXAMPLES
use Games::Maze;
#
# Create and print the maze and the solution to the maze.
#
my $minos = Games::Maze->new(dimensions => [15, 15, 3]);
$minos->make();
print "nnThe Maze...n", scalar($minos->to_ascii());
$minos->solve();
print "nnThe Solution...n", scalar($minos->to_ascii()), "n";
#
# We're curious about the maze properties.
#
my %p = $minos->describe();
foreach (sort keys %p)
{
if (ref $p{$_} eq "ARRAY")
{
print "$_ => [", join(", ", @{$p{$_}}), "]n";
}
else
{
print "$_ => ", $p{$_}, "n";
}
}
exit(0);
Product's homepage
Requirements:
· Perl 5.6 or later