Class HumanPlayerEngine
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.AbstractEngine
-
- ch.sahits.game.openpatrician.engine.player.HumanPlayerEngine
-
public class HumanPlayerEngine extends AbstractEngine
Engine handling automated tasks that are specific to a human player only.
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.eventbus.AsyncEventBusclientServerEventBusprivate PlayerListplayersprivate ShipServiceshipService
-
Constructor Summary
Constructors Constructor Description HumanPlayerEngine()
-
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.(package private) java.util.List<IPlayer>getHumanPlayers()voidhandleBuildingAuctionFinished(BuildingAuctionFinished event)voidhandleBuildingNotAuction(BuildingNotAuctioned event)voidhandleShipAuctionFinished(ShipAuctionFinished event)voidhandleShipNotAuction(ShipNotAuctioned event)private voidinit()private voidunregister()
-
-
-
Field Detail
-
players
@Autowired private PlayerList players
-
clientServerEventBus
@Autowired @Qualifier("serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
-
shipService
@Autowired private ShipService shipService
-
-
Method Detail
-
init
@PostConstruct private void init()
-
unregister
@PreDestroy private void unregister()
-
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.
-
getHumanPlayers
java.util.List<IPlayer> getHumanPlayers()
-
handleShipAuctionFinished
public void handleShipAuctionFinished(ShipAuctionFinished event)
-
handleShipNotAuction
public void handleShipNotAuction(ShipNotAuctioned event)
-
handleBuildingAuctionFinished
public void handleBuildingAuctionFinished(BuildingAuctionFinished event)
-
handleBuildingNotAuction
public void handleBuildingNotAuction(BuildingNotAuctioned event)
-
-