added the getter for the forcestartGame value in teh corresponding message

This commit is contained in:
Fleischer Hanno
2024-12-01 16:04:55 +01:00
parent 772c7a51e0
commit ba5b9dc4b4
5 changed files with 13 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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");
};
}

View File

@@ -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");}
};
}

View File

@@ -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);

View File

@@ -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.
*