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
@@ -130,7 +130,7 @@ public class ClientToServerThread implements Runnable {
} else {
streamPackets.add(new StreamPacket(type, payloadLength, timeStamp, payload));
for (ClientSocketListener csl : listeners)
csl.newPacket();
Platform.runLater(csl::newPacket);
}
} else {
clientLog("Packet has been dropped", 1);
@@ -147,7 +147,6 @@ public class ClientToServerThread implements Runnable {
clientLog(e.getMessage(), 1);
return;
}
System.out.println("streamPackets.size() = " + streamPackets.size());
}
closeSocket();
clientLog("Closed connection to Server", 0);
@@ -247,4 +246,8 @@ public class ClientToServerThread implements Runnable {
public Thread getThread() {
return thread;
}
public int getClientId () {
return clientId;
}
}