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.AsyncEventBus
clientServerEventBus
private PlayerList
players
private ShipService
shipService
-
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()
void
handleBuildingAuctionFinished(BuildingAuctionFinished event)
void
handleBuildingNotAuction(BuildingNotAuctioned event)
void
handleShipAuctionFinished(ShipAuctionFinished event)
void
handleShipNotAuction(ShipNotAuctioned event)
private void
init()
private void
unregister()
-
-
-
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:AbstractEngine
Any 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:
getChildren
in 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)
-
-