ChessLib icon indicating copy to clipboard operation
ChessLib copied to clipboard

Incorrect Fullmove number in FEN

Open xiety opened this issue 7 months ago • 0 comments

Wiki:

Fullmove number: The number of the full moves. It starts at 1 and is incremented after Black's move.

Example:

using Rudzoft.ChessLib.Factories;
using Rudzoft.ChessLib.Types;

var game = GameFactory.Create(@"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
game.Pos.MakeMove(new Move(Square.E2, Square.E4), new());

var result = game.Pos.FenNotation;

Console.WriteLine(result);

Actual result:

rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 2

Expected result:

rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1

Note the last character.

xiety avatar Nov 11 '23 12:11 xiety