Class PlayerEngine
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.AbstractEngine
-
- ch.sahits.game.openpatrician.engine.player.PlayerEngine
-
public class PlayerEngine extends AbstractEngine
Base engine representing a player. If the player is AI the correseponding engine will be a subclass of this engine.- Author:
- Andi Hotz, (c) Sahits GmbH, 2015 Created on Jun 16, 2015
-
-
Constructor Summary
Constructors Constructor Description PlayerEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<AbstractEngine>getChildren()Any engine may hold various child engines.voidhandleDailyUpdate(ch.sahits.game.event.data.ClockTickDayChange event)voidhandleShipArrivalInCity(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)voidhandleShipReachesDestination(ch.sahits.game.openpatrician.event.data.ShipArrivesAtDestinationEvent event)voidhandleWeeklyUpdate(ch.sahits.game.event.data.ClockTickDayChange event)Handling the daily update events.
-
-
-
Method Detail
-
handleDailyUpdate
public void handleDailyUpdate(ch.sahits.game.event.data.ClockTickDayChange event)
-
handleWeeklyUpdate
public void handleWeeklyUpdate(ch.sahits.game.event.data.ClockTickDayChange event)
Handling the daily update events.- Parameters:
event- day change update
-
getChildren
public java.util.List<AbstractEngine> getChildren()
Description copied from class:AbstractEngineAny engine may hold various child engines. This is the way to retrieve them. If there are no child engines, return an empty list. Subclasses have to implement this in the proper way.- Specified by:
getChildrenin classAbstractEngine- Returns:
- list of child engines.
-
handleShipReachesDestination
public void handleShipReachesDestination(ch.sahits.game.openpatrician.event.data.ShipArrivesAtDestinationEvent event)
-
handleShipArrivalInCity
public void handleShipArrivalInCity(ch.sahits.game.openpatrician.event.data.ShipEntersPortEvent event)
-
-