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