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