fixed ownColor sync problem

This commit is contained in:
Cedric Beck
2024-12-05 17:22:37 +01:00
parent ac5d7ed74b
commit d14a0aef86
2 changed files with 5 additions and 1 deletions

View File

@@ -318,5 +318,9 @@ public void afterGameCleanup() {
ceremonyView.afterGameCleanup();
}
public GameView getGameView(){
return gameView;
}
}

View File

@@ -73,8 +73,8 @@ private void handleLobby(Notification notification) {
} else if(notification instanceof LobbyReadyNotification lobbyReadyNotification) {
lobbyView.setReady(lobbyReadyNotification.getColor(), lobbyReadyNotification.isReady());
} else if (notification instanceof GameNotification n) {
app.getGameView().setOwnColor(n.getOwnColor());
app.enter(MdgaState.GAME);
((GameView) app.getView()).setOwnColor(n.getOwnColor());
} else {
throw new RuntimeException("notification not expected in lobby: " + notification.getClass().getName());
}