You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"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 text was updated successfully, but these errors were encountered:
"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"]
Bd7 7. Qc2 Nc6 8. b4 Bd6 9. Be2 Qe7 10. Na3 a5 11. b5 Nd8
Nxg6 27. Bxg6 Be8 28. Bf5 cxb5 29. c6 b4 30. Bc1 g5 31. c7 Bc6
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 text was updated successfully, but these errors were encountered: