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

FIX: promotion bug - undesired check #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dfeprado
Copy link

@dfeprado dfeprado commented Aug 16, 2024

If a black king is sitting on row 8 and a paw is promoted to a bishop, and there's no piece between these two, the unfixed code would evaluate to a check situation. The following images show this

Initially, we have this situation:
Screenshot from 2024-08-15 21-27-45

After promoting the White H7 Pawn to a White H8 Bishop, the blacks would end in check:
Screenshot from 2024-08-15 21-28-09

But that's a bug! The White Bishop cannot check the Black King on that situation.

This commit fix this bug.

If a black king is sitting on row 8 and a paw is promoted to a bishop,
 and there's no piece between these two, the unfixed code would
evaluate to a check. This commit fix this bug.
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

Successfully merging this pull request may close these issues.

1 participant