Package battleship

Class Carrack

java.lang.Object
battleship.Ship
battleship.Carrack
All Implemented Interfaces:
IShip

public class Carrack extends Ship
The type Carrack represents a ship with a size of 3 units. It is positioned on the game board based on its bearing and initial position. Author: britoeabreu Date: 2023-10-10 Time: 15:30
  • Constructor Details

    • Carrack

      public Carrack(Compass bearing, IPosition pos)
      Instantiates a new Carrack.
      Parameters:
      bearing - The bearing of the ship (NORTH, SOUTH, EAST, or WEST).
      pos - The initial position of the ship on the game board.