Fixed incorrect headings and velocity display location

- Velocity is now shown in the list of starting boats #fix
- Headings have been corrected

Tags: #fix
This commit is contained in:
Michael Rausch
2017-03-08 14:11:09 +13:00
parent 2adf39ee43
commit 92556fffca
4 changed files with 33 additions and 6 deletions
+8 -1
View File
@@ -158,6 +158,13 @@ public class Race {
Event event = new Event(time, boat, leg);
events.add(event);
totalDistance += leg.getDistance();
// If finishing leg, add another event for when the boat finishes the race
if (leg.getIsFinishingLeg()){
time = (long) (1000 * totalDistance / boat.getVelocity());
event = new Event(time, boat, leg, true);
events.add(event);
}
}
}
}
@@ -193,7 +200,7 @@ public class Race {
System.out.println(nextEvent.getEventString());
nextEvent.addBoatToMarker();
if (nextEvent.getLeg().getIsFinishingLeg()){
if (nextEvent.getIsFinishingEvent()){
this.finishingOrder.add(nextEvent.getBoat());
}
}