mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Added a check if race started, then start screen switches to race view automatically.
#story[572]
This commit is contained in:
@@ -89,6 +89,10 @@ public class Controller implements Initializable {
|
||||
@Override
|
||||
public void run() {
|
||||
Platform.runLater(() -> {
|
||||
if (StreamParser.isRaceStarted()) {
|
||||
switchToRaceView();
|
||||
timer.cancel();
|
||||
}
|
||||
if (StreamParser.isRaceFinished()) {
|
||||
realTime.setText(StreamParser.getCurrentTimeString());
|
||||
timeTillLive.setTextFill(Color.RED);
|
||||
|
||||
@@ -309,7 +309,6 @@ public class RaceViewController extends Thread{
|
||||
// }
|
||||
|
||||
for (Yacht boat : StreamParser.getBoatsPos().values()) {
|
||||
System.out.println(boat.getBoatStatus());
|
||||
if (boat.getBoatStatus() == 3) { // 3 is finish status
|
||||
positionVbox.getChildren().add(new Text(boat.getPosition() + ". " +
|
||||
boat.getShortName() + " (Finished)"));
|
||||
|
||||
Reference in New Issue
Block a user