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