Implemented GUI side of resetting the board

This commit is contained in:
2021-03-19 11:15:22 +01:00
parent b72e03711a
commit fa7bda4230
4 changed files with 14 additions and 11 deletions

View File

@@ -208,8 +208,6 @@ public class SinglePlayerServer {
case "exit":
try {
outstreams.get(client).writeInt(200);
outstreams.get(client).flush();
outstreams.get(client).close();
instreams.get(client).close();
client.close();
@@ -220,14 +218,8 @@ public class SinglePlayerServer {
break;
case "reset":
try {
outstreams.get(client).writeInt(200);
outstreams.get(client).flush();
ticTacToe_server.resetGameState();
this.gameFlow("gameState", client);
} catch (IOException e) {
e.printStackTrace();
}
ticTacToe_server.resetGameState();
this.sendGameState(client);
break;
}
}