IAIEventHandlerpublic class AIPlayerEngine extends AbstractEngine implements IAIEventHandler
| Constructor | Description |
|---|---|
AIPlayerEngine() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
executeCurrentTrade(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel) |
Check weather the current vessel is engaged in executing trade steps.
|
java.util.List<AbstractEngine> |
getChildren() |
Any engine may hold various child engines.
|
void |
handleBlockadeStart(ch.sahits.game.openpatrician.event.data.ai.BlockadeShipRequestEvent event) |
|
void |
handleBuildingAuctionFinished(ch.sahits.game.openpatrician.event.data.BuildingAuctionFinished event) |
|
void |
handleBuildingNotAuction(ch.sahits.game.openpatrician.event.data.BuildingNotAuctioned event) |
|
void |
handleGameLoad(ch.sahits.game.openpatrician.event.GameStateChange gameStateChange) |
Listen to the start of the game loading to continue with the handling of ship arrival events.
|
void |
handleMarriageEvent(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.clientserverinterface.model.event.MarriageBrokerAnnouncementState state) |
Handle the offer of a marriage broker.
|
void |
handleShipArrivesInCity(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event) |
|
void |
handleShipAuctionFinished(ch.sahits.game.openpatrician.event.data.ShipAuctionFinished event) |
|
void |
handleShipConstructionFinished(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.IAIPlayer player) |
Method to handle the finishing of a ship construction.
|
void |
handleShipNotAuction(ch.sahits.game.openpatrician.event.data.ShipNotAuctioned event) |
|
void |
handleSpecialMissionFinished(ch.sahits.game.openpatrician.event.data.ai.SpecialMissionFinishedEvent event) |
Handle the reinitialisation after finishing a special mission.
|
void |
handleTradeStrategyStart(ch.sahits.game.openpatrician.event.data.GraphInitialisationComplete event) |
|
void |
handleWeeklyTasks(ch.sahits.game.event.data.PeriodicalTimeWeekEndUpdate event) |
|
void |
initializeNewShip(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.IAIPlayer player) |
Method to handle the initializing of a trade strategy for a new ship.
|
public java.util.List<AbstractEngine> getChildren()
AbstractEnginegetChildren in class AbstractEnginepublic void handleBlockadeStart(ch.sahits.game.openpatrician.event.data.ai.BlockadeShipRequestEvent event)
public void handleShipArrivesInCity(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)
public void handleGameLoad(ch.sahits.game.openpatrician.event.GameStateChange gameStateChange)
gameStateChange - event for game state changepublic void handleTradeStrategyStart(ch.sahits.game.openpatrician.event.data.GraphInitialisationComplete event)
public boolean executeCurrentTrade(ch.sahits.game.openpatrician.model.ship.INavigableVessel vessel)
vessel - for which to check if it is activepublic void handleWeeklyTasks(ch.sahits.game.event.data.PeriodicalTimeWeekEndUpdate event)
public void handleSpecialMissionFinished(ch.sahits.game.openpatrician.event.data.ai.SpecialMissionFinishedEvent event)
event - special mission is finishedpublic void handleShipAuctionFinished(ch.sahits.game.openpatrician.event.data.ShipAuctionFinished event)
public void handleShipNotAuction(ch.sahits.game.openpatrician.event.data.ShipNotAuctioned event)
public void handleBuildingAuctionFinished(ch.sahits.game.openpatrician.event.data.BuildingAuctionFinished event)
public void handleBuildingNotAuction(ch.sahits.game.openpatrician.event.data.BuildingNotAuctioned event)
public void handleMarriageEvent(ch.sahits.game.openpatrician.model.IAIPlayer player,
ch.sahits.game.openpatrician.clientserverinterface.model.event.MarriageBrokerAnnouncementState state)
IAIEventHandlerhandleMarriageEvent in interface IAIEventHandlerstate - of the marriage brokerpublic void handleShipConstructionFinished(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.IAIPlayer player)
ship - that is newly constructedplayer - owner of the shippublic void initializeNewShip(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.IAIPlayer player)
initializeNewShip in interface IAIEventHandlership - to be initializedplayer - owner of the shipCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.