Game #23

Merged
schrom01 merged 43 commits from Game into main 2022-03-20 16:56:34 +01:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit 74a83e790a - Show all commits

View File

@ -197,9 +197,12 @@ public class Game implements GameSpecification {
@Override
public void switchToNextActiveCar() {
do {
if (currentCarIndex++ > track.getCarCount()) {
if ((currentCarIndex + 1) == track.getCarCount()) {
currentCarIndex = 0;
}
else {
currentCarIndex ++;
}
} while (track.getCar(currentCarIndex).isCrashed());
// TODO: evtl andere Kapselung
}