Boats now move on screen as intended.

TODO - Make the client connect to the server.
This commit is contained in:
Calum
2017-08-01 02:37:55 +12:00
parent 47c5e6f155
commit 908c0749cf
9 changed files with 200 additions and 349 deletions
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javafx.application.Platform;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import seng302.model.Player;
@@ -77,7 +78,7 @@ public class GameState implements Runnable {
public static void addPlayer(Player player) {
players.add(player);
String playerText = player.getYacht().getSourceId() + " " + player.getYacht().getBoatName() + " " + player.getYacht().getCountry();
observablePlayers.add(playerText);
Platform.runLater(() -> observablePlayers.add(playerText)); //Had to add this to handle javaFX window using array
playerStringMap.put(player, playerText);
}