From 21b222f3883eec73f3fdd9172ab12c543dae480a Mon Sep 17 00:00:00 2001 From: fdai6040 Date: Tue, 7 Feb 2023 10:09:44 +0100 Subject: [PATCH] Tic Tac Toe updating method chek --- src/main/java/src/TicTacToeGame.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/src/TicTacToeGame.java b/src/main/java/src/TicTacToeGame.java index 4da2ea2..1814562 100644 --- a/src/main/java/src/TicTacToeGame.java +++ b/src/main/java/src/TicTacToeGame.java @@ -91,6 +91,12 @@ public class TicTacToeGame implements ActionListener { { xWin(0, 4, 8); } + + else if ((bton[0].getText() == "X") && (bton[3].getText() == "X") && (bton[6].getText() == "X")) + { + xWin(0, 3, 6); + } + } //method if player X wins