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

Handling pawn promotion #15

Open
captainsano opened this issue Nov 25, 2017 · 0 comments
Open

Handling pawn promotion #15

captainsano opened this issue Nov 25, 2017 · 0 comments

Comments

@captainsano
Copy link

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?

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