Class Submarine

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

public class Submarine extends Ship
  • Constructor Details

    • Submarine

      public Submarine()
  • Method Details

    • restoreHealthInRecoveryMode

      public void restoreHealthInRecoveryMode()
      When the recovery mode is enabled this method restore. health of the ship to 1.
      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