fix: include gamestate events in applying to ensure the state is set correctly
This commit is contained in:
parent
0fb3ca8728
commit
0336e4769a
@ -116,19 +116,17 @@ class GameStateManager {
|
||||
GameState snapshot = state.snapshot();
|
||||
|
||||
ArrayList<Event> result = GameLogic.startGame(snapshot, selectedCharacters1, selectedCharacters2);
|
||||
applyEvents(result);
|
||||
|
||||
result.add(GameLogic.buildGameStateEvent(state));
|
||||
applyEvents(result);
|
||||
|
||||
snapshot = state.snapshot();
|
||||
|
||||
ArrayList<Event> result2 = GameLogic.startRound(snapshot);
|
||||
result.add(GameLogic.buildGameStateEvent(state));
|
||||
applyEvents(result2);
|
||||
|
||||
result.addAll(result2);
|
||||
|
||||
result.add(GameLogic.buildGameStateEvent(state));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user