919beb3b4bfa8caf2f90976a415fe9b19b7e9747
Build & Test (NowChessSystems) TeamCity build finished
- Add EnPassantCalculator to derive the en passant target square from GameHistory, detect en passant captures, and compute the captured pawn's square - Extend MoveValidator.legalTargets to include the en passant diagonal square in pawn legal targets - Extend GameController.processMove to remove the captured pawn from the board when an en passant capture is played 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 - EnPassantCalculatorTest — 14 unit tests covering target derivation, captured square calculation, and capture detection for both colors - MoveValidatorTest — 5 new tests: ep target included/excluded based on history, adjacency filter, both colors, case _ branch coverage - GameControllerTest — 2 integration tests: white and black en passant capture removes pawn from board and returns correct captured piece - 100% scoverage (line/branch/method) confirmed Co-authored-by: LQ63 <lkhermann@web.de> Reviewed-on: #8 Reviewed-by: Janis <janis-e@gmx.de> Co-authored-by: Leon Hermann <lq@blackhole.local> Co-committed-by: Leon Hermann <lq@blackhole.local>
Description
No description provided
Languages
Scala
80.3%
Python
14.7%
Bru
3.5%
HTML
1%
Shell
0.2%
Other
0.2%