Geras1mleo / Chess

C# .NET 6.0 Chess Library
MIT License
49 stars 15 forks source link

Wrong mate determination #23

Open Siderite opened 4 days ago

Siderite commented 4 days ago

Here is a puzzle PGN:

[FEN "8/2R2p1p/4k1p1/6P1/5PKP/r7/8/8 b - - 2 35"]
[SetUp "1"]

35... h5+ 36. gxh6 f5+ 37. Kg5 Rg3# *

After h5+ Board considers the game over as it doesn't see the enpassant.

Code:

var board = ChessBoard.LoadFromFen("8/2R2p1p/4k1p1/6P1/5PKP/r7/8/8 b - - 2 35");
board.Move("h5+");
board.Move("gxh6");

Exception thrown: Chess.ChessGameEndedException: 'This game is already ended.'