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