Started work on cucumber tests. Trying to sort through threads, getting inconsistent results.

#story[1111] #pair[kre39,ptg19]
This commit is contained in:
Kusal Ekanayake
2017-08-07 17:54:34 +12:00
parent f97b18d594
commit 97696cc95b
8 changed files with 74 additions and 6 deletions
@@ -25,6 +25,8 @@ import seng302.gameServer.server.messages.Message;
*/
public class ClientToServerThread implements Runnable {
/**
* Functional interface for receiving packets from client socket.
*/
@@ -250,9 +250,8 @@ public class GameClient {
private void processRaceStatusUpdate(RaceStatusData data) {
if (allXMLReceived()) {
raceState.updateState(data);
if (raceView != null) {
raceView.getGameView().setWindDir(raceState.getWindDirection());
}
if (raceView != null)
raceView.getGameView().setWindDir(raceState.getWindDirection());
for (long[] boatData : data.getBoatData()) {
Yacht yacht = allBoatsMap.get((int) boatData[0]);
yacht.setEstimateTimeTillNextMark(raceState.getRaceTime() - boatData[1]);
@@ -66,7 +66,7 @@ public class StartScreenController implements Initializable {
*/
@FXML
public void hostButtonPressed() {
new GameState(getLocalHostIp());
// new GameState(getLocalHostIp());
gameClient = new GameClient(holder);
gameClient.runAsHost(getLocalHostIp(), 4942);
// try {