Game::Battleship::Craft - A Battleship craft class
use Game::Battleship::Craft; my $craft = Game::Battleship::Craft->new( id => 'T', name => 'tug boat', points => 1, ) my $points_remaining = $craft->hit;
Game::Battleship::Craft object represents the profile of a Battleship
A scalar identifier to use to indicate position on the grid. If one is not provided, the upper-cased first name character will be used by default.
Currently, it is required that this be a single uppercase letter (the first letter of the craft name, probably), since a
hit will be indicated by "lower-casing" this mark on a player grid.
A required attribute provided to give the craft a name.
An attribute used to define the line segment span on the playing grid.
The position of the craft bow ("nose") on the grid.
Currently, the craft is assumed to have a horizontal or vertical alignment. Soon there will be diagonal positioning...
$points_remaining = $craft->hit;
Increment the craft's
hit attribute value and return what's left of the craft (total point value minus the number of hits).
Have different numbers of different weapons.
Allow a craft to have a width.
Allow diagonal positions too. Why not?
Gene Boggs <firstname.lastname@example.org>