Development #34

Merged
j23f0779 merged 19 commits from development into dev/model 2024-12-05 17:58:51 +01:00
34 changed files with 768 additions and 123 deletions
Showing only changes of commit 9d21e2ce87 - Show all commits

View File

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

View File

@@ -74,8 +74,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());
} }

View File

@@ -48,7 +48,6 @@ public GameView(MdgaApp app) {
@Override @Override
public void onEnter() { public void onEnter() {
setOwnColor(Color.AIRFORCE);
camera.init(ownColor); camera.init(ownColor);
boardHandler.init(); boardHandler.init();
guiHandler.init(ownColor); guiHandler.init(ownColor);

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB