#!perl use Test::More; eval 'use Test::MockModule;'; if($@) { plan( skip_all => q{missing Test::MockModule} ); } else { plan( tests => 1 ); } use FindBin; use lib "$FindBin::Bin/lib"; use MazeTestUtils; use TestString; use Games::Maze::SVG; use strict; use warnings; my $gmaze = Test::MockModule->new( 'Games::Maze' ); my $rectgrid = my $output = do { local $/ = undef; ; }; $gmaze->mock( make => sub { my $self = shift; $self->{entry} = [4,0]; $self->{exit} = [4,5]; }, to_ascii => sub { normalize_maze( <<'EOM' ); }, __ __ / \__/ \ \ / __ \ / \ / __/ \ / \__ \ / \__ \ / \ / __/ \ / \ / \ / \__ \__ \ \__/ \ / EOM ); # Default constructor. my $maze = Games::Maze::SVG->new( 'RectHex', cols => 3, rows => 3 ); $maze->set_interactive(); #open( my $fh, '>recthex1.svg' ) or die; #print $fh $maze->toString(); is_string( $maze->toString(), $output, "Full transform works." ); __DATA__ A Playable SVG Maze This maze was generated using the Games::Maze::SVG Perl module. SVG Maze 2006 An SVG-based Game G. Wade Johnson G. Wade Johnson 01110001110 11011011011 10001110001 11011011011 01110001110 11011011011 10001110001 11011011011 01110001110 11011011011 10001110001 11011011011 01110001110 00011011000 00001110000 00000000000 00000000000 Entry Exit Begin Save Back Move View Click Begin button to start Use the arrow keys to move the sprite Hold the shift to move quickly. The mouse must remain over the maze for the keys to work. Use arrow buttons to shift the maze Center button centers view on sprite Save button saves current position Back button restores last position Solved!