chessboardjs
chessboardjs copied to clipboard
create "lock" variable to prevent position-changing methods when executing the onChange function
Does this make sense to do?
This would prevent a user from creating an infinite loop, but it would also make their position-changing functions magically stop working if executed in their onChange function.
yea, i need that, i'm working on a multiplayer chess game with socket.io & node.js and i did select chessboard.js as GUI. but i can't prevent user moving opponent side peaces in client side. I can resend FEN by checking from server but it's not efficient and sufficient.
This sounds like a different problem than the one the issue is referring to. Check out the onDragStart event and Example 4002.