@Lazy @Service @DependentInitialisation(ch.sahits.game.openpatrician.model.initialisation.StartNewGameBean.class) public class PirateEngine extends AbstractEngine
| Constructor | Description |
|---|---|
PirateEngine() |
| Modifier and Type | Method | Description |
|---|---|---|
java.util.List<AbstractEngine> |
getChildren() |
Any engine may hold various child engines.
|
void |
handleNewPirate(ch.sahits.game.openpatrician.model.event.NewPirateEvent pirateEvent) |
Handle the even when a new pirate becomes available.
|
void |
handleRepairFinished(ch.sahits.game.openpatrician.event.data.RepairFinishedEvent event) |
Handle the event for the finished repair.
|
void |
handleRepairPirateShip(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event) |
|
void |
handleShipPositionUpdate(ch.sahits.game.openpatrician.event.data.ShipPositionUpdateEvent event) |
Check if there is a ship near the new position and decide if an attack should be initiated.
|
void |
handleShipReachesDestination(ch.sahits.game.openpatrician.event.data.ShipArrivesAtDestinationEvent event) |
Ship has reached it's destination, select a new one.
|
void |
handleWeeklyUpdate(ch.sahits.game.event.data.PeriodicalTimeWeekEndUpdate event) |
Periodically check if there is a free pirate and if not, create one.
|
void |
initializedGraph(ch.sahits.game.openpatrician.event.data.GraphInitialisationComplete event) |
public java.util.List<AbstractEngine> getChildren()
AbstractEnginegetChildren in class AbstractEnginepublic void initializedGraph(ch.sahits.game.openpatrician.event.data.GraphInitialisationComplete event)
public void handleNewPirate(ch.sahits.game.openpatrician.model.event.NewPirateEvent pirateEvent)
pirateEvent - new pirate emergedpublic void handleShipReachesDestination(ch.sahits.game.openpatrician.event.data.ShipArrivesAtDestinationEvent event)
event - ship arrives at destinationpublic void handleShipPositionUpdate(ch.sahits.game.openpatrician.event.data.ShipPositionUpdateEvent event)
event - ship changes positionpublic void handleRepairPirateShip(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)
public void handleRepairFinished(ch.sahits.game.openpatrician.event.data.RepairFinishedEvent event)
event - repair has finishedpublic void handleWeeklyUpdate(ch.sahits.game.event.data.PeriodicalTimeWeekEndUpdate event)
event - weekly updateCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.