mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Merge branch 'develop' into Story34_Sparklines
This commit is contained in:
@@ -109,9 +109,13 @@ public class BoatGroup extends RaceObject {
|
|||||||
teamNameObject.setCacheHint(CacheHint.SPEED);
|
teamNameObject.setCacheHint(CacheHint.SPEED);
|
||||||
velocityObject = new Text(String.valueOf(boat.getVelocity()));
|
velocityObject = new Text(String.valueOf(boat.getVelocity()));
|
||||||
DateFormat format = new SimpleDateFormat("mm:ss");
|
DateFormat format = new SimpleDateFormat("mm:ss");
|
||||||
|
// TODO: 21/05/17 make a nice way of checking for this to be null
|
||||||
|
estTimeToNextMarkObject = new Text("Next mark: null");
|
||||||
|
if (boat.getEstimateTimeAtNextMark() != null) {
|
||||||
String timeToNextMark = format
|
String timeToNextMark = format
|
||||||
.format(boat.getEstimateTimeAtNextMark() - StreamParser.getCurrentTimeLong());
|
.format(boat.getEstimateTimeAtNextMark() - StreamParser.getCurrentTimeLong());
|
||||||
estTimeToNextMarkObject = new Text("Next mark: " + timeToNextMark);
|
estTimeToNextMarkObject = new Text("Next mark: " + timeToNextMark);
|
||||||
|
}
|
||||||
if (boat.getMarkRoundingTime() != null) {
|
if (boat.getMarkRoundingTime() != null) {
|
||||||
String elapsedTime = format
|
String elapsedTime = format
|
||||||
.format(StreamParser.getCurrentTimeLong() - boat.getMarkRoundingTime());
|
.format(StreamParser.getCurrentTimeLong() - boat.getMarkRoundingTime());
|
||||||
@@ -280,9 +284,14 @@ public class BoatGroup extends RaceObject {
|
|||||||
velocityObject.setText(String.format("%.2f m/s", boat.getVelocity()));
|
velocityObject.setText(String.format("%.2f m/s", boat.getVelocity()));
|
||||||
DateFormat format = new SimpleDateFormat("mm:ss");
|
DateFormat format = new SimpleDateFormat("mm:ss");
|
||||||
// estimate time to next mark
|
// estimate time to next mark
|
||||||
|
// TODO: 21/05/17 make a nice way of checking for this to be null
|
||||||
|
estTimeToNextMarkObject.setText("Next mark: null");
|
||||||
|
if (boat.getEstimateTimeAtNextMark() != null) {
|
||||||
String timeToNextMark = format
|
String timeToNextMark = format
|
||||||
.format(boat.getEstimateTimeAtNextMark() - StreamParser.getCurrentTimeLong());
|
.format(
|
||||||
|
boat.getEstimateTimeAtNextMark() - StreamParser.getCurrentTimeLong());
|
||||||
estTimeToNextMarkObject.setText("Next mark: " + timeToNextMark);
|
estTimeToNextMarkObject.setText("Next mark: " + timeToNextMark);
|
||||||
|
}
|
||||||
// elapsed time
|
// elapsed time
|
||||||
if (boat.getMarkRoundingTime() != null) {
|
if (boat.getMarkRoundingTime() != null) {
|
||||||
String elapsedTime = format
|
String elapsedTime = format
|
||||||
|
|||||||
Reference in New Issue
Block a user