Browse Source

refactoring: deleted unnecessary data types

master
TRC9696 2 years ago
parent
commit
d6773baf0c
  1. 40
      src/main/java/game/StartTicTacToeGame.java

40
src/main/java/game/StartTicTacToeGame.java

@ -14,36 +14,20 @@ import Gui.gui;
public class StartTicTacToeGame implements ActionListener{ 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 player1Turn = true;
boolean player2Turn = false; boolean player2Turn = false;

Loading…
Cancel
Save