MarkZH / Genetic_Chess

An amateur attempt at breeding a chess-playing AI.
MIT License
10 stars 2 forks source link

Fix PGN reading and writing #130

Closed MarkZH closed 1 year ago

MarkZH commented 1 year ago

Current code reads and writes PGNs line-by-line. The spec does not have this requirement and allows for comments and moves during the same ply to occur over more than one line (especially in export format).

Reading

Note on above, it was simpler to change the parsing to go word-by-word or character-by-character.

Writing (export format)