Skip to content

feat: implement legal move generation#1

Merged
raklaptudirm merged 13 commits intomasterfrom
legal-movegen
Oct 23, 2022
Merged

feat: implement legal move generation#1
raklaptudirm merged 13 commits intomasterfrom
legal-movegen

Conversation

@raklaptudirm
Copy link
Copy Markdown
Owner

No description provided.

Or the bishop/rook and queen masks instead of and.
Fix issue where double pawn pushes were not generated if single push was impossible.
This occured when the double pawn push blocked a check, so the single push was not legal.
En Passant pins are tricky because two pieces vanish from the same rank
together. Properly deal with them using some original bitboard trickery.
Code now uses the SeenByEnemy bitboard to check if the king goes through
check while castling. Defined some new bitboards to aid the checking.
En Passant captures are now generated separately from normal attacks.
Also fixed the issue where ep was not considered valid when the ep pawn
was the king's checker.
@raklaptudirm raklaptudirm added the enhancement New feature or request label Oct 23, 2022
@raklaptudirm raklaptudirm self-assigned this Oct 23, 2022
@raklaptudirm raklaptudirm merged commit d15a918 into master Oct 23, 2022
@raklaptudirm raklaptudirm deleted the legal-movegen branch October 23, 2022 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant