diff --git a/src/main/java/game/StartTicTacToeGame.java b/src/main/java/game/StartTicTacToeGame.java index d39024a..509b635 100644 --- a/src/main/java/game/StartTicTacToeGame.java +++ b/src/main/java/game/StartTicTacToeGame.java @@ -293,5 +293,23 @@ public class StartTicTacToeGame implements ActionListener{ player2button8Pressed = true; } } + else if(e.getSource() == button9) { + if(player1Turn) { + button9.setForeground(Color.black); + button9.setText("X"); + button9.setFont(new Font("arial", Font.PLAIN, 30)); + player2Turn(); + button9.setEnabled(false); + player1button9Pressed = true; + } + else { + button9.setForeground(Color.black); + button9.setText("O"); + button9.setFont(new Font("arial", Font.PLAIN, 30)); + button9.setEnabled(false); + player1Turn(); + player2button9Pressed = true; + } + } } } \ No newline at end of file