"The PGN parsing process should not depend on property orders."
I had lots of pgn files in which "Result" propery before "White" or "Black" property, for example:
After parsing, the result is "ONGOING", that is incorrect.
The code from "GameLoader.java", line 153:
case "result":
if (game != null) {
GameResult r = GameResult.fromNotation(p.value);
game.setResult(r);
}
break;
here game is null, because game object will be initialized only after parsing "White" or "Black" property. The result is incorrect.
Of course after changing the property order in file, it works well.
"The PGN parsing process should not depend on property orders." I had lots of pgn files in which "Result" propery before "White" or "Black" property, for example:
[Event "1st World U20 ch"] [Site "Birmingham ENG"] [Date "1951.06.20"] [EventDate "1951.??.??"] [Round "9"] [Result "1-0"] [White "Bent Larsen"] [Black "Lionel Joyner"] [ECO "C30"] [WhiteElo "?"] [BlackElo "?"] [PlyCount "63"]
After parsing, the result is "ONGOING", that is incorrect.
The code from "GameLoader.java", line 153:
case "result": if (game != null) { GameResult r = GameResult.fromNotation(p.value); game.setResult(r); } break;
here game is null, because game object will be initialized only after parsing "White" or "Black" property. The result is incorrect. Of course after changing the property order in file, it works well.