RaceClock no has run(), or is runnable, as it wasn't needed.

Refactored Sparkline a bit. Now listens to our data model instead of being manually updated. Boat position labels don't work currently, though.
VisualiserRace now also tracks the order in which boats pass each leg.
This commit is contained in:
fjc40
2017-07-11 02:04:53 +12:00
parent 7d3cf6ee80
commit cab9bf9574
9 changed files with 155 additions and 133 deletions
@@ -1,5 +1,7 @@
package visualiser.model;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.scene.paint.Color;
import network.Messages.Enums.BoatStatusEnum;
import shared.model.Azimuth;
@@ -58,6 +60,7 @@ public class VisualiserBoat extends Boat {
/**
* Constructs a boat object from a given boat and color.
*
@@ -107,6 +110,8 @@ public class VisualiserBoat extends Boat {
*/
public void addTrackPoint(GPSCoordinate coordinate) {
//TODO bugfix: instead of creating a track point every #trackPointTimeInterval milliseconds of real time, we should base it off of race time, so that we will create a consistent number of track points regardless of what the race time scale is.
//Get current time.
long currentTime = System.currentTimeMillis();