mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user