Reimplemented race position in the race view. Removed Boat class and Yacht class is replaced completely. Race position "-" shows properly on start screen. Removed BoatTest and TeamsParserTest. Fixed estimated time till finish on server.

#story[818]
This commit is contained in:
Zhi You Tan
2017-05-04 13:50:06 +12:00
parent a4cc5f222c
commit 6935bd514e
19 changed files with 448 additions and 363 deletions
@@ -65,9 +65,7 @@ public class Controller implements Initializable {
@Override
public void initialize(URL location, ResourceBundle resources) {
DateFormat format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
format.setTimeZone(TimeZone.getTimeZone("UTC"));
realTime.setText(format.format(System.currentTimeMillis()));
}
/**
@@ -144,14 +142,14 @@ public class Controller implements Initializable {
posCol.setCellValueFactory(
new PropertyValueFactory<>("position")
);
if (StreamParser.isRaceStarted()) {
data.addAll(StreamParser.getBoatsPos().values());
} else {
for (Yacht boat : StreamParser.getBoats().values()) {
boat.setPosition("-");
data.add(boat);
}
}
// if (StreamParser.isRaceStarted()) {
data.addAll(StreamParser.getBoatsPos().values());
// } else {
// for (Yacht boat : StreamParser.getBoats().values()) {
// boat.setPosition("-");
// data.add(boat);
// }
// }
teamList.refresh();
// posCol.setSortType(TableColumn.SortType.ASCENDING);