Refactored Race, MockRace, and VisualiserRace to use RaceClock instead of keeping their own timers.

Moved FPS tracking to Race class, so both VisualiserRace and MockRace can monitor their FPS.
LatestMessages is now observable. It notifies observers when an XMLMessage is received.
Boat now has StringProperty for name and country/abbreviation.
Moved the MockRace timescale value to Constants.RaceTimeScale. This is passed in to MockRace on construction.
Tidied up StartController.
Copied the visualiser's resources into the resources folder.
Refactored RaceClock. Added comments. Tidied code a bit. Moved to shared.model.

Started work on RaceController.
This commit is contained in:
fjc40
2017-07-08 23:21:29 +12:00
parent f057ad58b7
commit abbbf70146
35 changed files with 2013 additions and 427 deletions
@@ -3,7 +3,7 @@ package shared.exceptions;
/**
* An exception thrown when we cannot generate Boats.xml and send an XML message, or we cannot parse a Boats.xml file.
*/
public class InvalidBoatDataException extends RuntimeException {
public class InvalidBoatDataException extends Exception {
public InvalidBoatDataException(String message) {
super(message);
@@ -3,7 +3,7 @@ package shared.exceptions;
/**
* Exception thrown when we cannot generate Race.xml data, and send an XML message, or we cannot parse a Race.xml file.
*/
public class InvalidRaceDataException extends RuntimeException {
public class InvalidRaceDataException extends Exception {
public InvalidRaceDataException(String message) {
super(message);
@@ -3,7 +3,7 @@ package shared.exceptions;
/**
* An exception thrown when we cannot generate Regatta.xml and send an XML message, or we cannot parse a Regatta.xml file.
*/
public class InvalidRegattaDataException extends RuntimeException {
public class InvalidRegattaDataException extends Exception {
public InvalidRegattaDataException(String message) {
super(message);