merge development into test #26
@@ -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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user