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