merge development into test #26

Merged
j23f0712 merged 95 commits from development into dev/test 2024-12-01 21:02:48 +01:00
2 changed files with 31 additions and 2 deletions
Showing only changes of commit 772c7a51e0 - Show all commits

View File

@@ -1,12 +1,41 @@
package pp.mdga.game; package pp.mdga.game;
/**
* This enumeration will be used to show the four different TSK which can be picked from a player.
* In Addition, the NONE color will be used to show a none color.
*/
public enum Color { public enum Color {
/**
* Represents the air force color.
*/
AIRFORCE, AIRFORCE,
/**
* Represents the cyber color.
*/
CYBER, CYBER,
/**
* Represents the navy color.
*/
NAVY, NAVY,
ARMY; /**
* Represents the army color.
*/
ARMY,
/**
* Represents the none color.
*/
NONE;
/**
* This method will be used to calculate the next color inside the sequence.
*
* @return color as a Color Enumeration.
*/
public Color next() { public Color next() {
if (this.next() == NONE) {
return AIRFORCE;
}
return values()[(ordinal() + 1) % values().length]; return values()[(ordinal() + 1) % values().length];
} }
} }

View File

@@ -9,7 +9,7 @@ public class Player {
private String name; private String name;
private Statistic playerStatistic; private Statistic playerStatistic;
private ArrayList<BonusCard> handCards; private ArrayList<BonusCard> handCards;
private Color color; private Color color = Color.NONE;
private boolean isReady; private boolean isReady;
private boolean active = true; private boolean active = true;