Development #34

Merged
j23f0779 merged 19 commits from development into dev/model 2024-12-05 17:58:51 +01:00
33 changed files with 762 additions and 122 deletions
Showing only changes of commit d14a0aef86 - Show all commits

View File

@@ -318,5 +318,9 @@ public void afterGameCleanup() {
ceremonyView.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) { } else if(notification instanceof LobbyReadyNotification lobbyReadyNotification) {
lobbyView.setReady(lobbyReadyNotification.getColor(), lobbyReadyNotification.isReady()); lobbyView.setReady(lobbyReadyNotification.getColor(), lobbyReadyNotification.isReady());
} else if (notification instanceof GameNotification n) { } else if (notification instanceof GameNotification n) {
app.getGameView().setOwnColor(n.getOwnColor());
app.enter(MdgaState.GAME); app.enter(MdgaState.GAME);
((GameView) app.getView()).setOwnColor(n.getOwnColor());
} else { } else {
throw new RuntimeException("notification not expected in lobby: " + notification.getClass().getName()); throw new RuntimeException("notification not expected in lobby: " + notification.getClass().getName());
} }