Class Carrier

java.lang.Object
battleship.model.ships.Ship
battleship.model.ships.Carrier

public class Carrier extends Ship
  • Constructor Details

    • Carrier

      public Carrier()
  • Method Details

    • restoreHealthInRecoveryMode

      public void restoreHealthInRecoveryMode()
      When the recovery mode is enabled this method restore. health of the ship to 4.
      Specified by:
      restoreHealthInRecoveryMode in class Ship
    • getLength

      public int getLength()
      Specified by:
      getLength in class Ship
      Returns:
      max length
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      ship type name