Gene Boggs > Game-Battleship-0.0503 > Game::Battleship::Craft

Download:
Game-Battleship-0.0503.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.0302   Source  

NAME ^

Game::Battleship::Craft - A Battleship craft class

SYNOPSIS ^

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

DESCRIPTION ^

A Game::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 Game::Battleship.

syntax highlighting: