Should fix the race xml issues where boats get unassigned sometimes.

This removes the static raceServer stuff.
The Race/Boat/Regatta XML commands only execute if they contain newer data (it checks the sequence number).
This commit is contained in:
fjc40
2017-09-18 12:44:10 +12:00
parent acd99f58cd
commit 424cd63c59
9 changed files with 28 additions and 18 deletions
@@ -24,7 +24,6 @@ import java.util.logging.Logger;
public class RaceServer {
private MockRace race;
private LatestMessages latestMessages;
private static RaceServer server;
private List<YachtEvent> collisionEvents = new ArrayList<>();
@@ -50,16 +49,10 @@ public class RaceServer {
public RaceServer(MockRace race, LatestMessages latestMessages) {
server = this;
this.race = race;
this.latestMessages = latestMessages;
}
public static void staticUpdateXML() {
if (server != null) {
server.updateXMLFiles();
}
}
/**
* Parses the race to create a snapshot, and places it in latestMessages.