NAME

Game::TextMapper::Point::Square - a square on a map

SYNOPSIS

use Modern::Perl;
use Game::TextMapper::Point::Square;
my $square = Game::TextMapper::Point::Square->new(x => 1, y => 1, z => 0);
say $square->svg_region('', [0]);
# <rect id="square110"  x="86.6" y="86.6" width="173.2" height="173.2" />

DESCRIPTION

This class holds information about a square region: coordinates, a label, and types. Types are the kinds of symbols that can be found in the region: a keep, a tree, a mountain. They correspond to SVG definitions. The class knows how to draw a SVG rectangle at the correct coordinates using these definitions.

SEE ALSO

This is a specialisation of Game::TextMapper::Point.

The SVG size is determined by $dy from Game::TextMapper::Constants.