refactor: introduce utils method for converting arrays into arraylists and make methods accessible with either

This commit is contained in:
2021-06-03 03:33:20 +02:00
parent 614b33adff
commit 09d798f37f
4 changed files with 61 additions and 1 deletions

View File

@ -49,6 +49,16 @@ class GameStateManager {
return true;
}
/**
* Applies an array of {@link Event}s to the game state.
* @param events The events to apply
*/
public void applyEvents(Event[] events) {
for(Event event: events) {
GameLogic.applyEvent(state, event);
}
}
/**
* Applies an array of {@link Event}s to the game state.
* @param events The events to apply