diff --git a/src/main/java/game/StartTicTacToeGame.java b/src/main/java/game/StartTicTacToeGame.java index 07e09b2..1beec3e 100644 --- a/src/main/java/game/StartTicTacToeGame.java +++ b/src/main/java/game/StartTicTacToeGame.java @@ -149,7 +149,24 @@ public class StartTicTacToeGame implements ActionListener{ @Override public void actionPerformed(ActionEvent e) { - // TODO Auto-generated method stub + if(e.getSource() == button) { + if(player1Turn) { + button.setForeground(Color.black); + button.setText("X"); + button.setFont(new Font("arial", Font.PLAIN, 30)); + player2Turn(); + button.setEnabled(false); + player1buttonPressed = true; + } + else { + button.setForeground(Color.black); + button.setText("O"); + button.setFont(new Font("arial", Font.PLAIN, 30)); + button.setEnabled(false); + player1Turn(); + player2buttonPressed = true; + } + } } } \ No newline at end of file