Skip to content

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.
@dfeprado dfeprado force-pushed the fix-checkOnPromotion branch from dbef7c5 to fcd903e Compare August 16, 2024 01:36
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.

2 participants