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