Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reversed board #461

Open
mirik999 opened this issue May 19, 2024 · 1 comment
Open

Reversed board #461

mirik999 opened this issue May 19, 2024 · 1 comment

Comments

@mirik999
Copy link

Hello everyone, I did a multiplayer game in react native and i could not find any usefull info how to reverse the board for player two to see black pieces at bottom side . Manually board.reverse() does the job only visually , is there any ready to use function to do this or any guides ? Thank you.

@mirik999
Copy link
Author

mirik999 commented May 19, 2024

with board.reverse() visually it reverse but actually chess.moves() dont know about it.
from d7 to d6 for example
const move = moves.find((m) => m.from === from && m.to === to);
this return undefined beause chess.moves() shows that it can go from d2 to ... . Without reverse() the piece located at d2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant