Class Submarine


public class Submarine extends Ship
A ship with a length of one tile.
Author:
harry
  • Constructor Details

    • Submarine

      public Submarine()
      Sets the inherited length variable and initializes the hit array, based on the size of this ship (1 tiles).
  • Method Details

    • getShipType

      public String getShipType()
      Specified by:
      getShipType in class Ship
      Returns:
      "Submarine", indicating that this is a Submarine.