diff options
Diffstat (limited to 'src/PGN.cpp')
| -rw-r--r-- | src/PGN.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/PGN.cpp b/src/PGN.cpp index 96346e8..c0c80e3 100644 --- a/src/PGN.cpp +++ b/src/PGN.cpp @@ -410,4 +410,13 @@ loctype PGN::GotoEOL(loctype loc) { } } +void ParseSANMoves(const std::string &sequence,HalfMove *moves) { + PGN parser; + // Note that PGN need a results (* at the end) + // Otherwise an InvalidGameResult exception is raised + parser.FromString(sequence+" *"); + parser.ParseNextGame(); + parser.GetMoves(moves); +} + } // namespace pgnp
\ No newline at end of file |
