diff --git a/src/main/java/game/StartTicTacToeGame.java b/src/main/java/game/StartTicTacToeGame.java index 1beec3e..2d5e82f 100644 --- a/src/main/java/game/StartTicTacToeGame.java +++ b/src/main/java/game/StartTicTacToeGame.java @@ -167,6 +167,23 @@ public class StartTicTacToeGame implements ActionListener{ player2buttonPressed = true; } } - + else if(e.getSource() == button2) { + if(player1Turn) { + button2.setForeground(Color.black); + button2.setText("X"); + button2.setFont(new Font("arial", Font.PLAIN, 30)); + player2Turn(); + button2.setEnabled(false); + player1button2Pressed = true; + } + else { + button2.setForeground(Color.black); + button2.setText("O"); + button2.setFont(new Font("arial", Font.PLAIN, 30)); + button2.setEnabled(false); + player1Turn(); + player2button2Pressed = true; + } + } } } \ No newline at end of file