Games::Battleship::Craft - A Battleship craft class


NAME

Games::Battleship::Craft - A Battleship craft class


SYNOPSIS

  use Games::Battleship::Craft;
  my $craft = Games::Battleship::Craft->new(
      id => 'T',
      name => 'tug boat',
      points => 1,
  )
  $points_remaining = $craft->hit;


DESCRIPTION

A Games::Battleship::Craft object represents the profile of a Battleship


PUBLIC METHODS

new %ARGUMENTS
hit
  $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).


TO DO

Have different numbers of different weapons.

Allow a craft to have a width.

Allow diagonal positions too. Why not?


AUTHOR

Gene Boggs <gene@cpan.org>


COPYRIGHT AND LICENSE

See the Games::Battleship manpage.

 Games::Battleship::Craft - A Battleship craft class