added correct colors in LobbyMenu

This commit is contained in:
Johannes Schmelz
2024-11-26 23:01:55 +01:00
parent 156e76fe0a
commit c8b69efca2
3 changed files with 29 additions and 14 deletions

View File

@@ -79,12 +79,12 @@ public class Player implements FieldVisitor<Void>{
public PlayerColor getColor() {
switch ((id%6)+1) {
case 1: return PlayerColor.BLUE;
case 2: return PlayerColor.GREEN_DARK;
case 3: return PlayerColor.GREEN_LIGHT;
case 1: return PlayerColor.CYAN;
case 2: return PlayerColor.YELLOW;
case 3: return PlayerColor.RED;
case 4: return PlayerColor.PINK;
case 5: return PlayerColor.RED;
case 6: return PlayerColor.YELLOW;
case 5: return PlayerColor.GREEN;
case 6: return PlayerColor.PURPLE;
default:
return null;

View File

@@ -6,12 +6,12 @@ import com.jme3.math.ColorRGBA;
* Enum representing six distinct colors for players in the game.
*/
public enum PlayerColor {
GREEN_LIGHT(new ColorRGBA(0 / 255f, 204 / 255f, 0 / 255f, 1)), // Hex: 00cc00
RED(new ColorRGBA(255 / 255f, 0 / 255f, 0 / 255f, 1)), // Hex: ff0000
BLUE(new ColorRGBA(0 / 255f, 0 / 255f, 204 / 255f, 1)), // Hex: 0000cc
PINK(new ColorRGBA(255 / 255f, 77 / 255f, 166 / 255f, 1)), // Hex: ff4da6
GREEN_DARK(new ColorRGBA(0 / 255f, 102 / 255f, 0 / 255f, 1)), // Hex: 006600
YELLOW(new ColorRGBA(255 / 255f, 255 / 255f, 0 / 255f, 1)); // Hex: ffff00
CYAN(new ColorRGBA(1 / 255f, 190 / 255f, 254 / 255f, 1)),
YELLOW(new ColorRGBA(255 / 255f, 255 / 255f, 0 / 255f, 1)),
RED(new ColorRGBA(255 / 255f, 0 / 255f, 0 / 255f, 1)),
PINK(new ColorRGBA(255 / 255f, 77 / 255f, 166 / 255f, 1)),
GREEN(new ColorRGBA(0 / 255f, 204 / 255f, 0 / 255f, 1)),
PURPLE(new ColorRGBA(143 / 255f, 0 / 255f, 255 / 255f, 1));
private final ColorRGBA color;