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