Closed LociStar closed 4 years ago
Hello @LociStar ,
I found a bug in the method that checks for move legality. It was allowing en passant move which was leaving the black king in check:
FEN 8/1pp3p1/4pq1p/PP1bp3/1Q2pPk1/4P1P1/2B5/6K1 b - f3 0 34
was generating the move e4f3
which lead to an invalid position and caused the exception.
Added tests for the perft reported and also for the invalid move generation: https://github.com/bhlangonijr/chesslib/pull/30
Thanks for reporting the bug!
I am closing it, tag 1.1.22 fixes de issue.
I got an Exception from prft test with depth 5 from fen "8/1pp3p1/4pq1p/PP1bpk2/1Q2p3/4P1P1/2B2P2/6K1 b - - 2 33".
Code:
Output:
Test Results — PerftTest.testPerft1.pdf