class ShipArrivalForLoading extends WaitTimeForShipArrival
| Modifier and Type | Field and Description |
|---|---|
private EventHandlerFactory |
eventHandlerFactory |
private int |
premium |
private int |
requiredAmount |
| Constructor and Description |
|---|
ShipArrivalForLoading(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player,
org.joda.time.DateTime deadline,
int requiredAmount,
int premium) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute() |
private static boolean |
hasShipEnoughCapacity(ch.sahits.game.openpatrician.model.ship.IShip ship,
int requiredAmount)
Check if the ship has enough capacity to load wares
|
private void |
initializeEventBus() |
getDate, handleShipEntersPortprivate final int requiredAmount
private final int premium
@Autowired private EventHandlerFactory eventHandlerFactory
public ShipArrivalForLoading(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player,
org.joda.time.DateTime deadline,
int requiredAmount,
int premium)
@PostConstruct private void initializeEventBus()
public boolean execute()
execute in class ch.sahits.game.event.handler.ShipArivalInPortEventListenerprivate static boolean hasShipEnoughCapacity(ch.sahits.game.openpatrician.model.ship.IShip ship,
int requiredAmount)
ship - requiredAmount - in barrelsCopyright © 2011-2015 Sahits GmbH. All Rights Reserved.