
Array::Tour::Random - Class for Array Tours.

use Array::Tour::Random qw(:directions);

Perl 5.6 or later. This is the version of perl under which this module was developed.

A simple iterator that will return the coordinates of the next cell if one were to randomly tour a matrix.
Creates the object with its attributes. The attributes are:
Set the size of the grid:
my $spath1 = Array::Tour->new(dimensions => [16, 16]);
If the grid is going to be square, a single integer is sufficient:
my $spath1 = Array::Tour->new(dimensions => 16);
Default value: [0, 0, 0]. Starting point of the random walk.
Returns 1 if there is more to the tour, 0 if finished.
Returns an array reference to the next coordinates to use. Returns undef if the iterator is finished.
Returns the current direction as found in the :directions EXPORT tag. These are the constant values North, West, South, and East.
Return the internal state of the iterator to its original form. Optionally change some of the characteristics using the same parameters found in the new() method.
Return a new object that follows the same path as the original object, reversing the inward/outward direction.
Returns as a hash the attributes of the maze object. The hash may be used to create a new tour object.
Returns the value of the dimensions attribute.
Games::Maze

John M. Gamble may be found at <jgamble@cpan.org>