diff --git a/Projekte/mdga/client/src/main/java/pp/mdga/client/button/CeremonyButton.java b/Projekte/mdga/client/src/main/java/pp/mdga/client/button/CeremonyButton.java index 00244262..c25a209c 100644 --- a/Projekte/mdga/client/src/main/java/pp/mdga/client/button/CeremonyButton.java +++ b/Projekte/mdga/client/src/main/java/pp/mdga/client/button/CeremonyButton.java @@ -110,6 +110,7 @@ public CeremonyButton(MdgaApp app, Node node, Node node3d, Color tsk, Pos pos, S instance.setText("Marine"); yield Asset.marine; } + default -> throw new RuntimeException("Color not supported"); }; switch (pos) { diff --git a/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/ActionTextHandler.java b/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/ActionTextHandler.java index e27686c1..32007c11 100644 --- a/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/ActionTextHandler.java +++ b/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/ActionTextHandler.java @@ -117,6 +117,7 @@ private ColorRGBA playerColorToColorRGBA(Color color){ case NAVY -> ColorRGBA.Blue; case CYBER -> ColorRGBA.Orange; case AIRFORCE -> ColorRGBA.Black; + default -> throw new RuntimeException("Color not supported"); }; } diff --git a/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/PlayerNameHandler.java b/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/PlayerNameHandler.java index 5a4456b9..3261c82a 100644 --- a/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/PlayerNameHandler.java +++ b/Projekte/mdga/client/src/main/java/pp/mdga/client/gui/PlayerNameHandler.java @@ -78,6 +78,7 @@ private String imagePath(Color color){ case NAVY -> root+"MARINE_IMAGE.png"; case CYBER -> root+"CIR_IMAGE.png"; case AIRFORCE -> root+"LW_IMAGE.png"; + default -> {throw new RuntimeException("Color not supported");} }; } diff --git a/Projekte/mdga/client/src/main/java/pp/mdga/client/view/LobbyView.java b/Projekte/mdga/client/src/main/java/pp/mdga/client/view/LobbyView.java index 6262e93f..6cede4e5 100644 --- a/Projekte/mdga/client/src/main/java/pp/mdga/client/view/LobbyView.java +++ b/Projekte/mdga/client/src/main/java/pp/mdga/client/view/LobbyView.java @@ -186,6 +186,7 @@ public void setReady(Color color, boolean isReady) { case AIRFORCE -> airforceButton; case ARMY -> armyButton; case NAVY -> navyButton; + default -> throw new IllegalStateException("Unexpected value: " + color); }; button.setReady(isReady); diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/message/client/StartGameMessage.java b/Projekte/mdga/model/src/main/java/pp/mdga/message/client/StartGameMessage.java index c2ff2ffb..bad3286c 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/message/client/StartGameMessage.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/message/client/StartGameMessage.java @@ -23,6 +23,15 @@ public StartGameMessage() { forceStartGame = false; } + /** + * Gets whether the game should be force started. + * + * @return whether the game should be force started + */ + public boolean isForceStartGame() { + return forceStartGame; + } + /** * Returns a string representation of this message. *