fixed ownColor sync problem
This commit is contained in:
@@ -318,5 +318,9 @@ public void afterGameCleanup() {
|
||||
|
||||
ceremonyView.afterGameCleanup();
|
||||
}
|
||||
|
||||
public GameView getGameView(){
|
||||
return gameView;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user