Class Blockade
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.sea.impl.Blockade
-
-
Constructor Summary
Constructors Constructor Description Blockade(java.time.LocalDateTime assemblyDate, java.time.LocalDateTime endBlockade)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddShips(IPlayer player, java.util.List<IShip> shipList)Add a number of ships for a player to the blockade.IConvoygetBlockadeConvoy()Retrieve the blockade convoyintgetNumberOfRequestedShips(IPlayer player)Retrieve the number of ships that are requested.java.util.List<IPlayer>getPlayersWithRequestedShips()Retrieve a list of players which have requested a shipjava.util.List<IShip>getShips()Retrieve all ships for the blockade.java.util.List<IShip>getShips(IPlayer player)Retrieve the ships of a certain player.voidrequestShip(IPlayer player, int number)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.sea.IBlockade
getAssemblyDate, getEndBlockade, getShipsToAuction, setConvoy
-
-
-
-
Method Detail
-
getBlockadeConvoy
public IConvoy getBlockadeConvoy()
Description copied from interface:IBlockadeRetrieve the blockade convoy- Specified by:
getBlockadeConvoyin interfaceIBlockade- Returns:
- convoy fleet executing the blockade
-
getShips
public java.util.List<IShip> getShips(IPlayer player)
Description copied from interface:IBlockadeRetrieve the ships of a certain player.
-
getShips
public java.util.List<IShip> getShips()
Description copied from interface:IBlockadeRetrieve all ships for the blockade.
-
requestShip
public void requestShip(IPlayer player, int number)
-
getNumberOfRequestedShips
public int getNumberOfRequestedShips(IPlayer player)
Description copied from interface:IBlockadeRetrieve the number of ships that are requested.- Specified by:
getNumberOfRequestedShipsin interfaceIBlockade- Parameters:
player- for whom to retrieve the number of requested ships- Returns:
- number of requested ships from
player
-
getPlayersWithRequestedShips
public java.util.List<IPlayer> getPlayersWithRequestedShips()
Description copied from interface:IBlockadeRetrieve a list of players which have requested a ship- Specified by:
getPlayersWithRequestedShipsin interfaceIBlockade- Returns:
- list of player who should provide ships for the blockade convoy
-
-