Added empty data sources, to be used by VisualiserRace.

Created FrameRateTracker which can be used to track framerate.
Updated RequestToJoinEnum and JoinAcceptanceEnum to match the agreed connection API.
Added AssignPlayerBoat message, which is used internally on the client to assign the player a source ID once they have connected.
Fixed some race conditions in the MessageRouter.
Updated ConnectionAcceptor.CheckClientConnection to wait slightly longer before removing connection (there was a slight race condition before).
Race no longer has a reference to LatestMessages. LatestMessages no longer has specific messages types in it.
Created RaceState class, which contains the state that is shared between VisualiserRaceState and MockRaceState (currently only used on visualiser).
Split VisualiserRace into VisualiserRaceState and VisualiserRaceService.
Added the VisualiserRace commands (BoatLocatonCommand, RaceStatusCommand, etc...).
Slightly increased the preferred width of race.fxml table columns.
issues #27 #37 #35
#story[1095]
This commit is contained in:
fjc40
2017-08-14 00:53:05 +12:00
parent 89b0aa8b77
commit 7366aba5ec
53 changed files with 2498 additions and 1129 deletions
@@ -11,22 +11,22 @@ public class RaceMap {
/**
* The longitude of the left side of the map.
*/
private final double longLeft;
private double longLeft;
/**
* The longitude of the right side of the map.
*/
private final double longRight;
private double longRight;
/**
* The latitude of the top side of the map.
*/
private final double latTop;
private double latTop;
/**
* The latitude of the bottom side of the map.
*/
private final double latBottom;
private double latBottom;
/**
@@ -143,4 +143,27 @@ public class RaceMap {
public void setHeight(int height) {
this.height = height;
}
/**
* Updates the bottom right GPS coordinates of the RaceMap.
* @param bottomRight New bottom right GPS coordinates.
*/
public void setGPSBotRight(GPSCoordinate bottomRight) {
this.latBottom = bottomRight.getLatitude();
this.longRight = bottomRight.getLongitude();
}
/**
* Updates the top left GPS coordinates of the RaceMap.
* @param topLeft New top left GPS coordinates.
*/
public void setGPSTopLeft(GPSCoordinate topLeft) {
this.latTop = topLeft.getLatitude();
this.longLeft = topLeft.getLongitude();
}
}