chesskit-app / chesskit-swift

♟️ Swift package for implementing chess logic.
MIT License
7 stars 6 forks source link

Fix rare pinned en passant issue #18

Closed pdil closed 2 months ago

pdil commented 2 months ago

In the following position, ChessKit allows white to capture black's pawn en passant even though that would put the white king in check.

The FEN for an example of this issue is: 1nbqkbnr/1pp1pppp/8/r1Pp3K/p7/5P2/PP1PP1PP/RNBQ1BNR w k d6 0 8