|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |