added next method for Color
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
package pp.mdga.game;
|
package pp.mdga.game;
|
||||||
|
|
||||||
public enum Color {
|
public enum Color {
|
||||||
ARMY,
|
AIRFORCE,
|
||||||
NAVY,
|
|
||||||
CYBER,
|
CYBER,
|
||||||
AIRFORCE
|
NAVY,
|
||||||
|
ARMY;
|
||||||
|
|
||||||
|
public Color next() {
|
||||||
|
return values()[(ordinal() + 1) % values().length];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user