Game test #29
|
@ -222,10 +222,9 @@ public class Game implements GameSpecification {
|
||||||
direction = track.getCar(currentCarIndex).getMoveStrategy().nextMove();
|
direction = track.getCar(currentCarIndex).getMoveStrategy().nextMove();
|
||||||
if (direction == null) {
|
if (direction == null) {
|
||||||
track.getCar(currentCarIndex).setMoveStrategy(new DoNotMoveStrategy());
|
track.getCar(currentCarIndex).setMoveStrategy(new DoNotMoveStrategy());
|
||||||
track.getCar(currentCarIndex).getMoveStrategy().nextMove();
|
direction = track.getCar(currentCarIndex).getMoveStrategy().nextMove();
|
||||||
}else {
|
|
||||||
doCarTurn(direction);
|
|
||||||
}
|
}
|
||||||
|
doCarTurn(direction);
|
||||||
switchToNextActiveCar();
|
switchToNextActiveCar();
|
||||||
}
|
}
|
||||||
userInterface.printTrack(track);
|
userInterface.printTrack(track);
|
||||||
|
|
Loading…
Reference in New Issue