From 6e7a1e08d6aa7cd0a9e11b7e46e04c5828de1b7b Mon Sep 17 00:00:00 2001 From: fdai6040 Date: Tue, 7 Feb 2023 10:30:44 +0100 Subject: [PATCH] Tic Tac Toe updating method to chek btn 3-8 --- src/main/java/src/TicTacToeGame.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/src/TicTacToeGame.java b/src/main/java/src/TicTacToeGame.java index b86001f..1216348 100644 --- a/src/main/java/src/TicTacToeGame.java +++ b/src/main/java/src/TicTacToeGame.java @@ -108,7 +108,14 @@ public class TicTacToeGame implements ActionListener { { 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