mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed the Yacht clas so it now works.
Lists and Maps are instantiated as they should be in GameState which were creating NullPointers Introduced ServerLog to server to client threads for bug reporting Introduced some print statements to test the game state updating upon receiving key presses tags: #story[989] #refactor #fix
This commit is contained in:
@@ -19,7 +19,6 @@ public class ClientToServerThread extends Thread {
|
||||
private Socket socket;
|
||||
private InputStream is;
|
||||
private OutputStream os;
|
||||
private final int PORT_NUMBER = 0;
|
||||
private static final int LOG_LEVEL = 1;
|
||||
|
||||
private Boolean updateClient = true;
|
||||
@@ -36,9 +35,9 @@ public class ClientToServerThread extends Thread {
|
||||
|
||||
}
|
||||
|
||||
static void serverLog(String message, int logLevel){
|
||||
static void clientLog(String message, int logLevel){
|
||||
if(logLevel <= LOG_LEVEL){
|
||||
System.out.println("[SERVER] " + message);
|
||||
System.out.println("[CLIENT] " + message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +97,7 @@ public class ClientToServerThread extends Thread {
|
||||
try {
|
||||
os.write(boatActionMessage.getBuffer());
|
||||
} catch (IOException e) {
|
||||
clientLog("COULD NOT WRITE TO SERVER", 0);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user