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 rare pinned en passant issue #18

Closed
pdil opened this issue Apr 27, 2024 · 0 comments · Fixed by #21
Closed

Fix rare pinned en passant issue #18

pdil opened this issue Apr 27, 2024 · 0 comments · Fixed by #21
Assignees
Labels
bug A bug or issue that should be resolved
Milestone

Comments

@pdil
Copy link
Member

pdil commented Apr 27, 2024

In the following position, ChessKit allows white to capture black's pawn en passant even though that would put the white king in check.

The FEN for an example of this issue is:
1nbqkbnr/1pp1pppp/8/r1Pp3K/p7/5P2/PP1PP1PP/RNBQ1BNR w k d6 0 8

@pdil pdil added the bug A bug or issue that should be resolved label Apr 27, 2024
@pdil pdil self-assigned this Apr 27, 2024
@pdil pdil added this to the 1.0.0 milestone Apr 27, 2024
@pdil pdil pinned this issue Apr 27, 2024
@pdil pdil closed this as completed in #21 Apr 30, 2024
pdil added a commit that referenced this issue Apr 30, 2024
* Added en passant step to move validation to prevent en passant moves
that leave the king in check.
* For an example of such a position see:
`1nbqkbnr/1pp1pppp/8/r1Pp3K/p7/5P2/PP1PP1PP/RNBQ1BNR w k d6 0 8`

fixes #18
@pdil pdil unpinned this issue Aug 3, 2024
@pdil pdil pinned this issue Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug or issue that should be resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant