feat: implement method to start a game

This commit is contained in:
2021-05-19 20:04:10 +02:00
parent f3b5fc277e
commit 596ace355a
3 changed files with 18 additions and 3 deletions

View File

@ -53,6 +53,14 @@ class GameStateManager {
return (Event[])GameLogic.checkTurnEnd(state).toArray();
}
/**
* Starts the game.
* @return The resulting {@link Event}s
*/
public Event[] startGame() {
return (Event[])GameLogic.handleTurnEnd(state).toArray();
}
/**
* Applies an array of {@link Event}s to the game state.
* @param events The events to apply