Games::Battleship::Craft is a Battleship craft class.. #Battleship class #Battleship craft #Perl module #Games::Battleship::C #Battleship #Craft
Games::Battleship::Craft is a Battleship craft class.
use Games::Battleship::Craft;
my $craft = Games::Battleship::Craft->new( id => 'T', name => 'tug boat', points => 1, )
$points_remaining = $craft->hit;
A Games::Battleship::Craft object represents the profile of a Battleship
new %ARGUMENTS
id => $STRING
A scalar identifier to use to indicate position on the grid. If one is not provided, the uppercased 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 "lowercasing" this mark on a player grid.
name => $STRING
A required attribute provided to give the craft a name.
points => $NUMBER
An attribute used to define the line segment span on the playing grid.
position => [$X, $Y]
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...
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).
System requirements
- Perl
Games::Battleship::Craft 0.05
add to watchlist add to download basket send us an update REPORT- runs on:
- Linux
- filename:
- Games-Battleship-0.05.tar.gz
- main category:
- Programming
- developer:
- visit homepage
IrfanView 4.67
paint.net 5.0.13 (5.13.8830.42291)
Zoom Client 6.0.0.37205
7-Zip 23.01 / 24.04 Beta
Windows Sandbox Launcher 1.0.0
ShareX 16.0.1
4k Video Downloader 1.5.3.0080 Plus / 4.30.0.5655
Bitdefender Antivirus Free 27.0.35.146
Microsoft Teams 24060.3102.2733.5911 Home / 1.7.00.7956 Work
calibre 7.9.0
- Bitdefender Antivirus Free
- Microsoft Teams
- calibre
- IrfanView
- paint.net
- Zoom Client
- 7-Zip
- Windows Sandbox Launcher
- ShareX
- 4k Video Downloader