Is there a way to allow only 1 play when the board becomes visible? I am trying to set up a correspondence chess game but cannot have one person playing both sides. White plays then should not be able to do anything further until black plays.
I tried adding this to the end of onDrop but it didn't work:
var childNodes = document.getElementById("board1").getElementsByTagName('*');
for (var node of childNodes) {
node.disabled = true;
}
Is there a way to allow only 1 play when the board becomes visible? I am trying to set up a correspondence chess game but cannot have one person playing both sides. White plays then should not be able to do anything further until black plays.
I tried adding this to the end of onDrop but it didn't work:
var childNodes = document.getElementById("board1").getElementsByTagName('*'); for (var node of childNodes) { node.disabled = true; }