feat: add method to end the current turn

This commit is contained in:
2021-06-03 02:21:12 +02:00
parent 3bb6d81b27
commit dd3201dfd2
2 changed files with 18 additions and 0 deletions

View File

@ -112,6 +112,16 @@ class GameStateManager {
return result;
}
/**
* Forcefully ends the current turn.
* @return The resulting {@link Event}s
*/
public ArrayList<Event> endTurn() {
ArrayList<Event> result = GameLogic.endTurn(state);
applyEvents(result);
return result;
}
/**
* Produces a {@link EventType#GamestateEvent} for the current {@link GameState}.
* @return The resulting event