Package battleship
Class Barge
java.lang.Object
battleship.Ship
battleship.Barge
- All Implemented Interfaces:
IShip
The type Barge represents a ship with a size of 1 unit.
It is positioned on the game board based on its bearing and initial position.
Author: britoeabreu
Date: 2023-10-10
Time: 15:30
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class battleship.Ship
getAdjacentPositions, getBearing, getBottomMostPos, getCategory, getLeftMostPos, getPosition, getPositions, getRightMostPos, getSize, getTopMostPos, occupies, shoot, sink, stillFloating, tooCloseTo, tooCloseTo, toString
-
Constructor Details
-
Barge
Instantiates a new Barge.- Parameters:
bearing- The bearing of the barge (NORTH, SOUTH, EAST, or WEST).pos- The upper-left position of the barge on the game board.
-