Skip to content
Snippets Groups Projects
Commit c27d98ab authored by Martin Schmollinger's avatar Martin Schmollinger
Browse files

Renamed status code

parent 27b476e1
Branches main
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ public class GuessGameApp {
* Client wins! 2 = Incorrect Guess 9 = Game Over
*/
public static final int START_GAME=0;
public static final int GAME_STARTED=0;
public static final int SERVER_READY=0;
public static final int CORRECT_GUESS=1;
public static final int INCORRECT_GUESS=2;
public static final int GAME_OVER=9;
......@@ -41,7 +41,7 @@ public class GuessGameApp {
//Start game
toServer.write(START_GAME);
int serverCode = fromServer.read();
if (serverCode==GAME_STARTED) {
if (serverCode==SERVER_READY) {
System.out.println("Game started!");
} else {
throw new IllegalStateException("Client and Server not synchronized!");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment