-
Notifications
You must be signed in to change notification settings - Fork 22
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
Implement pawn promotion #3
Comments
Can I work on this one ? 😄 |
Typescript is good to go You can accept the pull Request if you like it matheusmosca#3 matheusmosca#11 #happycoding #hacktober fest !!
Before adding a modal I think the code might need some rearranging, because when using a modal, you need to make the game "wait" for the player to make his choice, and currently the code is not designed to wait on something. I think it would be useful to create an other issue to adapt the code first 😄 |
sorry to answer just now, i've been a bit busy these days |
No problem, I've been busy these days too. Could you describe better which adaption it would be? I created this repo when I get started with TypeScript, that is why my code doesn't look so good though. But I think the modal isn't dependent on the game progress, might there is a way to create a function which observes if a pawn can be promoted, then open a modal and handle the promotion event. In that approach, the logic wouldn't be on the piece's logic. But I may be wrong, thanks for your suggestion! 😄 |
The promotion event happens when a pawn reaches the last row (white player) or the first row (black player).
The text was updated successfully, but these errors were encountered: