Browse Source

Tic Tac Toe update chek method for buttons 0-6 if 0 wins

remotes/origin/develop
fdai6040 2 years ago
parent
commit
9073442a2f
  1. 4
      src/main/java/src/TicTacToeGame.java

4
src/main/java/src/TicTacToeGame.java

@ -120,6 +120,10 @@ public class TicTacToeGame implements ActionListener {
{
oWin(0, 1, 2);
}
else if ((bton[0].getText() == "O") && (bton[3].getText() == "O") && (bton[6].getText() == "O"))
{
oWin(0, 3, 6);
}
}
//method if player 0 wins
private void oWin(int i, int i1, int i2) {

Loading…
Cancel
Save