Game #23
|
@ -121,7 +121,12 @@ public class Game implements GameSpecification {
|
|||
*/
|
||||
@Override
|
||||
public int getWinner() {
|
||||
// TODO: implementation
|
||||
List<Car> cars = track.getCars();
|
||||
for (Car car: cars) {
|
||||
if(car.getWinPoints() == 1){
|
||||
return car.getID();
|
||||
}
|
||||
}
|
||||
return NO_WINNER;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue