public class EventEngineState
extends java.lang.Object
| Constructor | Description |
|---|---|
EventEngineState() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addFire(ch.sahits.game.openpatrician.model.city.ICity city,
java.time.LocalDateTime date) |
Add or override the date of the last fire in the city
|
void |
addPlague(ch.sahits.game.openpatrician.model.city.ICity city,
java.time.LocalDateTime date) |
Add or override the date of the last plague in the city
|
java.util.Optional<java.time.LocalDateTime> |
getLastFire(ch.sahits.game.openpatrician.model.city.ICity city) |
Retrieve the Date of the last fire.
|
java.util.Optional<java.time.LocalDateTime> |
getLastPlague(ch.sahits.game.openpatrician.model.city.ICity city) |
Retrieve the Date of the last plague.
|
java.util.Optional<EEventState> |
getMarriageState(ch.sahits.game.openpatrician.model.IPlayer player) |
Retrieve the current marriage state of the player.
|
void |
resetMarriedState(ch.sahits.game.openpatrician.model.IPlayer player) |
Remove the player form the marriage state map.
|
void |
setMarriageState(ch.sahits.game.openpatrician.model.IPlayer player,
EEventState state) |
Set or update the marriage state of a player.
|
public void addFire(ch.sahits.game.openpatrician.model.city.ICity city,
java.time.LocalDateTime date)
city - where the fire happeneddate - when the fire happenedpublic java.util.Optional<java.time.LocalDateTime> getLastFire(ch.sahits.game.openpatrician.model.city.ICity city)
city - which should be checkedpublic void addPlague(ch.sahits.game.openpatrician.model.city.ICity city,
java.time.LocalDateTime date)
city - where the plague happeneddate - when the plague happenedpublic java.util.Optional<java.time.LocalDateTime> getLastPlague(ch.sahits.game.openpatrician.model.city.ICity city)
city - which should be checkedpublic void setMarriageState(ch.sahits.game.openpatrician.model.IPlayer player,
EEventState state)
player - to be updatedstate - marriage statepublic java.util.Optional<EEventState> getMarriageState(ch.sahits.game.openpatrician.model.IPlayer player)
player - to be checked.public void resetMarriedState(ch.sahits.game.openpatrician.model.IPlayer player)
player - that gets married.Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.