Unfortunately the snippet of code below is not functioning as it should. It's attached to a JLabel so that when clicked, notices whether PlayerOne or PlayerTwo is playing, and re-arranges their boolean values accordingly
[ex: When mouseClicked:If playerOne is true, then do something, and set playerOne to false and playerTwo to true].
So, it swaps their values when mouseClicked is activated!
public void mouseClicked(MouseEvent arg0) {
if(playerOne = true){
playerOne = false;
playerTwo = true;
boxOne.setIcon(xIcon);
} else { if(playerTwo = true){
playerOne = true;
playerTwo = false;
boxOne.setIcon(oIcon);
}}
Thanks in advance, Tom!