|
|
@ -239,5 +239,23 @@ public class StartTicTacToeGame implements ActionListener{ |
|
|
|
player2button5Pressed = true; |
|
|
|
} |
|
|
|
} |
|
|
|
else if(e.getSource() == button6) { |
|
|
|
if(player1Turn) { |
|
|
|
button6.setForeground(Color.black); |
|
|
|
button6.setText("X"); |
|
|
|
button6.setFont(new Font("arial", Font.PLAIN, 30)); |
|
|
|
player2Turn(); |
|
|
|
button6.setEnabled(false); |
|
|
|
player1button6Pressed = true; |
|
|
|
} |
|
|
|
else { |
|
|
|
button6.setForeground(Color.black); |
|
|
|
button6.setText("O"); |
|
|
|
button6.setFont(new Font("arial", Font.PLAIN, 30)); |
|
|
|
player1Turn(); |
|
|
|
button6.setEnabled(false); |
|
|
|
player2button6Pressed = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |