Reworked protocol between server and client

- Changed successCodes from int to boolean
- Added exception handling for better debugging in TicTacToe_Client
- fixed bug that disallowed singleplayer mode
This commit is contained in:
2021-03-22 01:11:18 +01:00
parent 9195dbad22
commit d0425f6402
5 changed files with 93 additions and 74 deletions

View File

@@ -64,7 +64,6 @@ public class Engine extends Application {
}
public void updateTitle(String title) {
System.out.println("title: " + title);
primaryStage.setTitle(title);
}
@@ -87,10 +86,6 @@ public class Engine extends Application {
}
public void drawBoard(String gameState) {
if (gameState.length() != 9) {
System.err.println("Wrong length of gameState string");
return;
}
if (gameState.equals("---------")) {
grid.getChildren().clear();
}