From 7c8cf55ac2bb9e847b2b367e29f20da6aa69a648 Mon Sep 17 00:00:00 2001 From: romanschenk37 <84532681+romanschenk37@users.noreply.github.com> Date: Thu, 24 Mar 2022 19:14:36 +0100 Subject: [PATCH] fix calculateNewWinPoints --- src/main/java/ch/zhaw/pm2/racetrack/Track.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/zhaw/pm2/racetrack/Track.java b/src/main/java/ch/zhaw/pm2/racetrack/Track.java index 1012840..a403626 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/Track.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/Track.java @@ -435,16 +435,16 @@ public class Track implements TrackSpecification { for (PositionVector point : path) { switch (getSpaceType(point)) { case FINISH_UP: - if (start.getY() < finish.getY()) { + if (start.getY() > finish.getY()) { return 1; - } else if (start.getY() > finish.getY()) { + } else if (start.getY() < finish.getY()) { return -1; } break; case FINISH_DOWN: - if (start.getY() > finish.getY()) { + if (start.getY() < finish.getY()) { return 1; - } else if (start.getY() < finish.getY()) { + } else if (start.getY() > finish.getY()) { return -1; } break;