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