Fix gameover

Fix issue with gameOver code being executed in only one chain.
This commit is contained in:
journich
2021-02-24 12:16:47 +10:30
parent a7182ed402
commit 260c12fb84

View File

@@ -144,13 +144,12 @@ public class Bug {
System.out.println();
draw(computersBug);
gameState = GAME_STATE.PLAYER_TURN;
}
if (gameOver) {
System.out.println("I HOPE YOU ENJOYED THE GAME, PLAY IT AGAIN SOON!!");
gameState = GAME_STATE.GAME_OVER;
}
}
}
} while (gameState != GAME_STATE.GAME_OVER);
}