Version 1.0 #40

Merged
j23f0779 merged 947 commits from development2 into main 2024-12-13 10:26:49 +01:00
Showing only changes of commit 5dc3124533 - Show all commits

View File

@@ -60,9 +60,16 @@ public Color next(Game game) {
colorsInGame.add(p.getColor());
}
int nextIndex = (this.ordinal() + 1) % colorsInGame.size();
int current = -1;
for(int i = 0; i < colorsInGame.size(); i++) {
Color c = colorsInGame.get(i);
return colorsInGame.get(nextIndex);
if(c.equals(game.getActiveColor())) {
current = i;
}
}
return colorsInGame.get((current + 1) % colorsInGame.size());
}
/**