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