You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @truongtrungtinh That's an interesting problem. I think you can extend the component so you have more flexibility to configure the underline components (chess.js and chessground), then you have to validate which user is white and which is black and prevent the movement.
Here is an example of how to extend the component to play against a random move computer https://github.com/vitogit/vue-chessboard#extended-component-play-vs-random-ai In your case I think you can have 2 methods, whitePlay, blackPlay and add a condition if the currentUser is white or black make the move otherwise just return
How to prevent the same player move white and black.
ex: if orientation is white then can't move black
Please help me.
The text was updated successfully, but these errors were encountered: