lucasart / c-chess-cli

Command Line Interface for UCI Chess engines written in C
GNU General Public License v3.0
71 stars 9 forks source link

Move counter in pgn starts at 0 #38

Closed tryingsomestuff closed 3 years ago

tryingsomestuff commented 3 years ago

Isn't move counter shall start at 1 ?

[Round "1.4"]
[White "3.04_NiNy"]
[Black "3.04_NoNo"]
[Result "0-1"]
[Termination "checkmate"]
[FEN "rnbq1rk1/pp1pbpp1/4pn1p/6B1/2P5/P1N2N2/1PQ1PPPP/R3KB1R w KQ - 0 0"]
[PlyCount "134"]

0. Bh4 {38/21 36165ms} d6 {-24/20 32597ms} 1. Rd1 {22/21 28410ms} a6 {-34/22 20197ms}

I see lichess won't import the game if it starts at move named "0".

lucasart commented 3 years ago

PGN doesn't start at 1, but starts from the current move number given by the FEN, which is "0". So the FEN is wrong.

lucasart commented 3 years ago

fixed 4ae3db822f28989b902ef6b118fb28b3cd477a02. Now the FEN is rejected with an explicit error message.