Closed julianandrews closed 3 years ago
According to the spec HA, KM, TB, and TW are go specific, and the format for the move, point and stone types are game specific. and game 1 (go) is the default, so I should only need to change the behavior if another game is explicitly specified.
As a first step, it should be possible to parse the HA, KM, TB, and TW properties as Unknown
for non-go games, and store moves, points and stones as un-parsed strings.
Later, support could be added for other game specific properties, but that isn't essential at this point.
This came up in issue #8
@kurnevsky - would that address your use cases?
Yes, it would. Though I already used sgf-parser
crate which also parses moves as go-specific. But in case move can't be parsed it leaves the property as unknown
. But I'd probably leave all moves as plain strings for unknown game types because they can have unique format.
Right now the parser assumes a game is go. However, sgf supports a wider range of games, and so should sgf-parse!