mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-21 14:50:54 -08:00
Added missing break statement
The break statement would prevent infinite loop when player choose 'o' or 'O'
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user