mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Changed getMark to getThisMark. Added start point to KeyFrame. Race now starts from start point and ends at finish point
#story[377]
This commit is contained in:
@@ -82,8 +82,8 @@ public class CanvasController {
|
|||||||
for (Event event : events) {
|
for (Event event : events) {
|
||||||
keyFrames.add(
|
keyFrames.add(
|
||||||
new KeyFrame(Duration.seconds(event.getTime() / 60 / 60 / 5),
|
new KeyFrame(Duration.seconds(event.getTime() / 60 / 60 / 5),
|
||||||
new KeyValue(x, event.getMark().getLatitude()),
|
new KeyValue(x, event.getThisMark().getLatitude()),
|
||||||
new KeyValue(y, event.getMark().getLongitude())
|
new KeyValue(y, event.getThisMark().getLongitude())
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,8 +147,8 @@ public class Event {
|
|||||||
*
|
*
|
||||||
* @return the mark
|
* @return the mark
|
||||||
*/
|
*/
|
||||||
public Mark getMark() {
|
public Mark getThisMark() {
|
||||||
return this.mark2;
|
return this.mark1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -157,6 +157,6 @@ public class Event {
|
|||||||
* @return the next mark
|
* @return the next mark
|
||||||
*/
|
*/
|
||||||
public Mark getNextMark() {
|
public Mark getNextMark() {
|
||||||
return this.mark1;
|
return this.mark2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -100,6 +100,13 @@ public class Race {
|
|||||||
}
|
}
|
||||||
totalDistance += event.getDistanceBetweenMarks();
|
totalDistance += event.getDistanceBetweenMarks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// There are no more marks after this event
|
||||||
|
|
||||||
|
else{
|
||||||
|
Event event = new Event(time, boat, course.get(i), course.get(i));
|
||||||
|
events.get(boat).add(event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user