So in abbreviation, your code is structured something like this:
|
Code:
|
while (game = true) {
while (true) {
//... bunch of code here
}
System.out.println("do you want to play again Press 1 if you do"); // This line
//... more code here |
So the compiler is helping you out here, because there in fact is no way for that line to be reached seeing as it follows a while (true) {} block.
Solution: fix your code so that it is reachable.
Much luck!