Arrows now rendered in correct orientation but rounding arc sometimes inverted.

#implement #story[1118]
This commit is contained in:
Calum
2017-08-16 20:29:56 +12:00
parent 21e6819f16
commit 86a7c2565c
2 changed files with 8 additions and 7 deletions
@@ -263,20 +263,20 @@ public class GameClient {
if (allXMLReceived()) {
ClientYacht yacht = allBoatsMap.get(roundingData.getBoatId());
int placing = 1;
int originalPlacing = yacht.getPlacing();
// int originalPlacing = yacht.getPlacing();
for (ClientYacht otherYacht : allBoatsMap.values()) {
if (otherYacht != yacht && yacht.getLegNumber() + 1 <= otherYacht.getLegNumber()) {
placing++;
}
}
if (placing != originalPlacing) {
// if (placing != originalPlacing) {
yacht.setPlacing(placing);
for (ClientYacht otherYacht : allBoatsMap.values()) {
if (otherYacht.getPlacing() < placing) {
otherYacht.setPlacing(otherYacht.getPlacing() + 1);
}
}
}
// }
yacht.roundMark(
courseData.getCompoundMarks().get(roundingData.getMarkId()),
roundingData.getTimeStamp(),
@@ -765,11 +765,12 @@ public class GameView extends Pane {
for (Mark mark : compoundMark.getMarks()) {
markerObjects.get(mark).showNextExitArrow();
}
if (legNumber < course.size()) {
CompoundMark nextMark = course.get(legNumber);
System.out.println("nextMark = " + nextMark);
for (Mark mark : nextMark.getMarks()) {
markerObjects.get(mark).showNextEnterArrow();
}
}
if (legNumber - 2 >= 0) {
CompoundMark lastMark = course.get(Math.max(0, legNumber - 2));
for (Mark mark : lastMark.getMarks()) {