-
Notifications
You must be signed in to change notification settings - Fork 10
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
Handling pawn promotion #15
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The library at present does not handle pawn promotions. I'm planning to put up a PR for this. What would be an ideal way to provide APIs for this? My suggestion would be,
1 - Update onMovePiece to also pass the promotedToPiece param in case of promotion.
2 - Add a promotion prompt as soon as we recognize white/black pawn on 8/1 rank. (not API but displayed on the board)
3 - Cancel the promotion prompt if new props come in or if the user clicks outside.
A good start?
The text was updated successfully, but these errors were encountered: