FEN is not correctly computed.
vieiro opened this issue · comments
Hi,
I've just installed Stockfish Version 2.0.2 (19) from the AppStore and I was trying out the FEN capabilities by looking at a recent game from the Baku Olympiad. I'm attaching a sample PGN file.
baku-game.zip
After 2.g3, Stockfish reports this FEN:
rnbqkb1r/pppppppp/5n2/8/8/5NP1/PPPPPP1P/RNBQKB1R b KQkq - 3 2
But since a pawn has moved, the move number (the 3 above) should be set to 0, so the FEN should look like:
rnbqkb1r/pppppppp/5n2/8/8/5NP1/PPPPPP1P/RNBQKB1R b KQkq - 0 2
Also, after 2... d5, the move number should be reset to 0 again (another pawn has moved), and the enpassant portion of the FEN should be set to d6
rnbqkb1r/ppp1pppp/5n2/3p4/8/5NP1/PPPPPP1P/RNBQKB1R w KQkq d6 0 3
But the application reports
rnbqkb1r/ppp1pppp/5n2/3p4/8/5NP1/PPPPPP1P/RNBQKB1R w KQkq - 4 3