mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Removed extra 'minutes' labels
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package seng302;
|
package seng302;
|
||||||
|
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
|
import javafx.application.Platform;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
@@ -19,6 +20,10 @@ public class App extends Application
|
|||||||
primaryStage.setMaximized(true);
|
primaryStage.setMaximized(true);
|
||||||
|
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
|
primaryStage.setOnCloseRequest(e -> {
|
||||||
|
Platform.exit();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -305,21 +305,21 @@ public class RaceViewController extends Thread{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String currentTimer() {
|
private String currentTimer() {
|
||||||
String timerString = "0:00 minutes";
|
String timerString = "0:00";
|
||||||
if (StreamParser.getTimeSinceStart() > 0) {
|
if (StreamParser.getTimeSinceStart() > 0) {
|
||||||
String timerMinute = Long.toString(StreamParser.getTimeSinceStart() / 60);
|
String timerMinute = Long.toString(StreamParser.getTimeSinceStart() / 60);
|
||||||
String timerSecond = Long.toString(StreamParser.getTimeSinceStart() % 60);
|
String timerSecond = Long.toString(StreamParser.getTimeSinceStart() % 60);
|
||||||
if (timerSecond.length() == 1) {
|
if (timerSecond.length() == 1) {
|
||||||
timerSecond = "0" + timerSecond;
|
timerSecond = "0" + timerSecond;
|
||||||
}
|
}
|
||||||
timerString = "-" + timerMinute + ":" + timerSecond + " minutes";
|
timerString = "-" + timerMinute + ":" + timerSecond;
|
||||||
} else {
|
} else {
|
||||||
String timerMinute = Long.toString(-1 * StreamParser.getTimeSinceStart() / 60);
|
String timerMinute = Long.toString(-1 * StreamParser.getTimeSinceStart() / 60);
|
||||||
String timerSecond = Long.toString(-1 * StreamParser.getTimeSinceStart() % 60);
|
String timerSecond = Long.toString(-1 * StreamParser.getTimeSinceStart() % 60);
|
||||||
if (timerSecond.length() == 1) {
|
if (timerSecond.length() == 1) {
|
||||||
timerSecond = "0" + timerSecond;
|
timerSecond = "0" + timerSecond;
|
||||||
}
|
}
|
||||||
timerString = timerMinute + ":" + timerSecond + " minutes";
|
timerString = timerMinute + ":" + timerSecond;
|
||||||
}
|
}
|
||||||
return timerString;
|
return timerString;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,8 +102,8 @@ public class Race {
|
|||||||
events.put(boat, new ArrayList<>(Arrays.asList(event)));
|
events.put(boat, new ArrayList<>(Arrays.asList(event)));
|
||||||
}
|
}
|
||||||
totalDistance += event.getDistanceBetweenMarks();
|
totalDistance += event.getDistanceBetweenMarks();
|
||||||
System.out.println(totalDistance);
|
//System.out.println(totalDistance);
|
||||||
System.out.println(boat.getVelocity());
|
//System.out.println(boat.getVelocity());
|
||||||
}
|
}
|
||||||
|
|
||||||
// There are no more marks after this event
|
// There are no more marks after this event
|
||||||
|
|||||||
Reference in New Issue
Block a user