feat: NCS-9 En passant implementation #8
Reference in New Issue
Block a user
Delete Branch "feat/NCS-9"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add EnPassantCalculator to derive the en passant target square from GameHistory, detect en passant captures, and
compute the captured pawn's square
Details
En passant is derived purely from the last HistoryMove — no new state is introduced. If the last move was a double
pawn push, the target square is the square the pawn passed through. The board mutation follows the same pattern as
castling: board.withMove moves the capturing pawn, then board.removed removes the captured pawn from its actual square
(which differs from the destination square).
Test Plan
detection for both colors
branch coverage
correct captured piece
a0d20a9975to9ab1317eceBitte den PR Namen aktualisieren.
feat/NCS-9to feat/NCS-9: En passantfeat/NCS-9: En passantto feat: NCS-9 En passant implementation