ply! implements a small DSL for writing moves in code using a natural-ish
algebraic notation.
assert_move_list! takes a generator and an expected list of moves and asserts
that they're equal. This macro is mostly a copy from one I wrote earlier in the
position crate.
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.
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.