public class TavernEngine extends AbstractEngine
| Modifier and Type | Field and Description |
|---|---|
private int |
beggarSailorRation |
private CaptainEngine |
captainEngine |
private ch.sahits.game.openpatrician.model.city.ICity |
city |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private Random |
rnd |
private ch.sahits.game.openpatrician.model.city.impl.TavernState |
state |
| Constructor and Description |
|---|
TavernEngine(ch.sahits.game.openpatrician.model.city.impl.TavernState state,
ch.sahits.game.openpatrician.model.city.ICity city) |
| Modifier and Type | Method and Description |
|---|---|
private int |
computeNumbersOfSailors() |
void |
fireSailor() |
List<AbstractEngine> |
getChildren()
Any engine may hold various child engines.
|
void |
handleDayChange(ClockTickDayChange event) |
private void |
handlePersonsBecomingAbsent()
Randomized state update for persons that are not present.
|
private void |
handlePersonsBecomingPresent()
Randomized state update for persons that are present.
|
void |
hireSailor() |
private void |
init() |
@Autowired private Random rnd
private final ch.sahits.game.openpatrician.model.city.impl.TavernState state
@Value(value="${beggar.salior.ratio}")
private int beggarSailorRation
@Autowired private CaptainEngine captainEngine
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
private final ch.sahits.game.openpatrician.model.city.ICity city
public TavernEngine(ch.sahits.game.openpatrician.model.city.impl.TavernState state,
ch.sahits.game.openpatrician.model.city.ICity city)
public List<AbstractEngine> getChildren()
AbstractEnginegetChildren in class AbstractEngine@PostConstruct private void init()
private int computeNumbersOfSailors()
public void handleDayChange(ClockTickDayChange event)
private void handlePersonsBecomingAbsent()
private void handlePersonsBecomingPresent()
public void hireSailor()
public void fireSailor()
Copyright © 2011-2015 Sahits GmbH. All Rights Reserved.