Added missing break statement

The break statement would prevent infinite loop when player choose 'o' or 'O'
This commit is contained in:
Rohit Lohia
2022-03-05 20:29:33 +05:30
committed by GitHub
parent f5e33ae38f
commit 4bf0c62267

View File

@@ -33,6 +33,7 @@ public class TicTacToe2 {
} else if (input == 'O' || input == 'o') {
yourChar = 'O';
compChar = 'X';
break;
} else {
System.out.println("THATS NOT 'X' OR 'O', TRY AGAIN");
in.nextLine();