Fix colorNext
This commit is contained in:
@@ -62,9 +62,10 @@ public Color next(Game game) {
|
||||
|
||||
int current = game.getActiveColor().ordinal();
|
||||
|
||||
int next = current + 1;
|
||||
int next = (current + 1) % 4;
|
||||
while (!colorsInGame.contains(Color.values()[next])) {
|
||||
next++;
|
||||
next %= 4;
|
||||
}
|
||||
|
||||
return Color.values()[next];
|
||||
|
||||
Reference in New Issue
Block a user