Browse Source

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

remotes/origin/develop
fdai6040 2 years ago
parent
commit
05def41195
  1. 6
      src/main/java/src/TicTacToeGame.java

6
src/main/java/src/TicTacToeGame.java

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

Loading…
Cancel
Save