Class Battleship
java.lang.Object
Ship
Battleship
A Ship with a length of four tiles.
- Author:
- harry
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSets the inheritedlength
variable and initializes thehit
array, based on the size of this ship (4 tiles). -
Method Summary
Methods inherited from class Ship
getBowColumn, getBowRow, getLength, isHorizontal, isSunk, okToPlaceShipAt, placeShipAt, setBowColumn, setBowRow, setHorizontal, shootAt, toString
-
Constructor Details
-
Battleship
public Battleship()Sets the inheritedlength
variable and initializes thehit
array, based on the size of this ship (4 tiles).
-
-
Method Details
-
getShipType
- Specified by:
getShipType
in classShip
- Returns:
- "Battleship", indicating that this is a Battleship.
-