Commit graph

3 commits

Author SHA1 Message Date
2c6a7828bc [moves] Two new pawn move tests 2025-05-25 11:05:21 -07:00
09bf17d66b [moves] Implement promotions and en passant in the PawnMoveGenerator
Add another sub-iterator to the PawnMoveGenerator that produces promotion pushes
or capture moves (depending on move_type) when a pawn moves to the back rank.

Also implement en passant moves.

Fix a bug in the Left and Right captures branches where the wrong neighbors used
to calculate origin squares.

Add a whole bunch of tests. Still missing several cases though.
2025-05-24 18:01:14 -07:00
574ab803dd [moves] Implement a move generator for pawns
I used Claude to help me figure this out. First time using AI for coding. It was
actually rather helpful!

Calculate BitBoards representing the various kinds of pawn moves when the move
generator is created, and then iterate through them.

En passant still isn't implemented here. This code has not been tested yet either.
2025-05-23 18:36:22 -07:00