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;