diff --git a/src/main/java/ch/zhaw/pm2/racetrack/Game.java b/src/main/java/ch/zhaw/pm2/racetrack/Game.java index 44c5bde..ac0b81e 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/Game.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/Game.java @@ -121,7 +121,12 @@ public class Game implements GameSpecification { */ @Override public int getWinner() { - // TODO: implementation + List cars = track.getCars(); + for (Car car: cars) { + if(car.getWinPoints() == 1){ + return car.getID(); + } + } return NO_WINNER; }