Browse Source

Tic Tac Toe updated chek method to print "Game Draw", if chance_flag 9

remotes/origin/develop
fdai6040 2 years ago
parent
commit
d178e5af58
  1. 5
      src/main/java/src/TicTacToeGame.java

5
src/main/java/src/TicTacToeGame.java

@ -145,8 +145,9 @@ public class TicTacToeGame implements ActionListener {
else if ((bton[6].getText() == "O") && (bton[7].getText() == "O") && (bton[8].getText() == "O"))
{
oWin(6, 7, 8);
}
else if ((bton[3].getText()== "O") && (bton[4].getText() == "O") && (bton[5].getText() == "O"))
} else if (chance_flag==9) {
textfield.setText("Game Draw :)");
} else if ((bton[3].getText()== "O") && (bton[4].getText() == "O") && (bton[5].getText() == "O"))
oWin(3,4,5);
}

Loading…
Cancel
Save