added the getter for the forcestartGame value in teh corresponding message
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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");}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user