From d6773baf0cbaa90a49e8333203899bd1627c4484 Mon Sep 17 00:00:00 2001 From: TRC9696 Date: Mon, 30 Jan 2023 17:38:09 +0100 Subject: [PATCH] refactoring: deleted unnecessary data types --- src/main/java/game/StartTicTacToeGame.java | 40 +++++++--------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/src/main/java/game/StartTicTacToeGame.java b/src/main/java/game/StartTicTacToeGame.java index 221c8eb..2809781 100644 --- a/src/main/java/game/StartTicTacToeGame.java +++ b/src/main/java/game/StartTicTacToeGame.java @@ -14,36 +14,20 @@ import Gui.gui; public class StartTicTacToeGame implements ActionListener{ - static JButton button = new JButton(); - static JButton button2 = new JButton(); - static JButton button3 = new JButton(); - static JButton button4 = new JButton(); - static JButton button5 = new JButton(); - static JButton button6 = new JButton(); - static JButton button7 = new JButton(); - static JButton button8 = new JButton(); - static JButton button9 = new JButton(); - static JButton backButton = new JButton(); + static JButton button,button2,button3,button4, + button5,button6,button7,button8,button9,backButton = new JButton(); - boolean player1buttonPressed = false; - boolean player1button2Pressed = false; - boolean player1button3Pressed = false; - boolean player1button4Pressed = false; - boolean player1button5Pressed = false; - boolean player1button6Pressed = false; - boolean player1button7Pressed = false; - boolean player1button8Pressed = false; - boolean player1button9Pressed = false; + boolean player1buttonPressed, player1button2Pressed, + player1button3Pressed, player1button4Pressed, + player1button5Pressed, player1button6Pressed, + player1button7Pressed, player1button8Pressed, + player1button9Pressed = false; - boolean player2buttonPressed = false; - boolean player2button2Pressed = false; - boolean player2button3Pressed = false; - boolean player2button4Pressed = false; - boolean player2button5Pressed = false; - boolean player2button6Pressed = false; - boolean player2button7Pressed = false; - boolean player2button8Pressed = false; - boolean player2button9Pressed = false; + boolean player2buttonPressed, player2button2Pressed, + player2button3Pressed, player2button4Pressed, + player2button5Pressed, player2button6Pressed, + player2button7Pressed, player2button8Pressed, + player2button9Pressed = false; boolean player1Turn = true; boolean player2Turn = false;