Uses of Interface
battleship.IShip
-
Uses of IShip in battleship
Classes in battleship that implement IShipModifier and TypeClassDescriptionclassThe type Barge represents a ship with a size of 1 unit.classThe type Caravel represents a ship with a size of 2 units.classThe type Carrack represents a ship with a size of 3 units.classThe type Frigate represents a ship with a size of 4 units.classThe type Galleon represents a ship with a size of 5 units.classThe type Ship.Methods in battleship that return IShipModifier and TypeMethodDescriptionIGame.ShotResult.ship()Returns the value of theshiprecord component.Ship at ship.Ship at ship.Methods in battleship that return types with arguments of type IShipModifier and TypeMethodDescriptionFleet.getFloatingShips()Gets floating ships.IFleet.getFloatingShips()Gets floating ships.Fleet.getShips()Gets ships.IFleet.getShips()Gets ships.Fleet.getShipsLike(String category) Gets ships like.IFleet.getShipsLike(String category) Gets ships like.Fleet.getSunkShips()Gets sunk ships.IFleet.getSunkShips()Gets sunk ships.Methods in battleship with parameters of type IShipModifier and TypeMethodDescriptionbooleanAdd ship boolean.booleanAdd ship boolean.booleanIShip.tooCloseTo(IShip other) Too close to boolean.booleanShip.tooCloseTo(IShip other) Too close to boolean.Method parameters in battleship with type arguments of type IShipModifier and TypeMethodDescriptionvoidFleet.printShips(List<IShip> ships) This operation prints all the given shipsConstructors in battleship with parameters of type IShipModifierConstructorDescriptionShotResult(boolean valid, boolean repeated, IShip ship, boolean sunk) Creates an instance of aShotResultrecord class.