Browse Source

Tic Tac Toe updating method to chek btn 3-8

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

9
src/main/java/src/TicTacToeGame.java

@ -108,7 +108,14 @@ public class TicTacToeGame implements ActionListener {
{ {
xWin(2, 5, 8); xWin(2, 5, 8);
} }
else if ((bton[3].getText() == "X") && (bton[4].getText() == "X") && (bton[5].getText() == "X"))
{
xWin(3, 4, 5);
}
else if ((bton[6].getText() == "X") && (bton[7].getText() == "X") && (bton[8].getText() == "X"))
{
xWin(6, 7, 8);
}
} }
//method if player X wins //method if player X wins

Loading…
Cancel
Save