Class Destroyer


public class Destroyer extends Ship
A ship with a length of two tiles.
Author:
harry
  • Constructor Details

    • Destroyer

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

    • getShipType

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