Class Cruiser
java.lang.Object
Ship
Cruiser
A ship with a length of three tiles.
- Author:
- harry
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCruiser()Sets the inheritedlengthvariable and initializes thehitarray, 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 inheritedlengthvariable and initializes thehitarray, based on the size of this ship (3 tiles).
-
-
Method Details
-
getShipType
- Specified by:
getShipTypein classShip- Returns:
- "Cruiser", indicating that this is a Cruiser.
-