Closed liebig closed 3 years ago
Hey @liebig, thank you for the PRs. Would you fix the conflict in this one? Thanks, Ben
the changes on this PR has been merged here: https://github.com/bhlangonijr/chesslib/commit/8b167cf3749d681b459592a210016d5b3cc4011d
A function to count the number of games in a PGN file before loading would be interesting, as this would also allow a PgnLoadListener to calculate the exact percentage of games currently processed. For the implementation I count all lines which start with the string "[Event " because the Event field is mandatory by PGN definition. This implementation is fast. Counting 121332 games took my PC 707ms while loading the PGN file took 18597ms.