G. Wade Johnson > Games-Maze-SVG-0.78 > Games::Maze::SVG::Rect

Download:
Games-Maze-SVG-0.78.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.72   Source  

NAME ^

Games::Maze::SVG::Rect - Build rectangular mazes in SVG.

VERSION ^

Version 0.72

SYNOPSIS ^

Games::Maze::SVG::Rect uses the Games::Maze module to create mazes in SVG.

    use Games::Maze::SVG;

    my $foo = Games::Maze::SVG->new( 'Rect' );
    ...

FUNCTIONS ^

new

Create a new Games::Maze::SVG::Rect object. Supports the following named parameters:

wallform

String naming the wall format. Legal values are bevel, round, roundcorners, and straight.

crumb

String describing the breadcrumb design. Legal values are dash, dot, line, and none

dir

Directory in which to find the ecmascript for the maze interactivity. Should either be relative, or in URL form.

is_hex

Method always returns false.

is_hex_shaped

Method always returns false.

set_wall_form

Set the wall format for the current maze.

$form

String specifying a wall format.

Returns a reference to self for chaining.

transform_grid

Convert the rectangular grid from ascii format to SVG definition references.

$rows

Reference to an array of rows

$walls

String specifying wall format.

remove_horiz_padding

Remove the extra horizontal space inserted to regularize the look of the rectangular maze

$rows

Reference to an array of rows

wall_definitions

Method that returns the definition for the shapes used to build the walls.

convert_start_position

Convert the supplied x and y coordinates into the appropriate real coordinates for a start position on this map.

$x x coord from the maze
$y y coord from the maze

returns a two element list containing (x, y).

convert_end_position

Convert the supplied x and y coordinates into the appropriate real coordinates for a end position on this map.

$x x coord from the maze
$y y coord from the maze

returns a two element list containing (x, y).

convert_sign_position

Convert the supplied x and y coordinates into the appropriate real coordinates for a the position of the exit sign.

$x x coord from the maze
$y y coord from the maze

returns a two element list containing (x, y).

AUTHOR ^

G. Wade Johnson, <wade@anomaly.org>

BUGS ^

Please report any bugs or feature requests to bug-game-maze-svg@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Game-Maze-SVG. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS ^

Thanks go to Valen Johnson and Jason Wood for extensive test play of the mazes.

COPYRIGHT & LICENSE ^

Copyright 2004-2006 G. Wade Johnson, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: