Working ordering for in game AND race finish screen.

List in RaceState holds a sorted list of yachts.
A Listener is added to this list, listening for a permutation change, on perm change, sorts the list by comparitor of leg number of each yacht (stable sort)
This commit is contained in:
William Muir
2017-08-16 23:22:58 +12:00
parent 9727e86249
commit 65286f273b
4 changed files with 16 additions and 10 deletions
@@ -437,6 +437,7 @@ public class GameState implements Runnable {
}
if (hasProgressed) {
yacht.incrementLegNumber();
sendMarkRoundingMessage(yacht);
logMarkRounding(yacht);
yacht.setHasPassedLine(false);
@@ -444,7 +445,6 @@ public class GameState implements Runnable {
yacht.setHasPassedThroughGate(false);
if (!markOrder.isLastMark(currentMarkSeqID)) {
yacht.incrementMarkSeqID();
yacht.incrementLegNumber();
}
}
}