Commit Graph
4 Commits
Author SHA1 Message Date
Carton He 4eec9365bd Support encoding detection
Some go servers mistakenly generate sgf files without correct CA
properties. Use chardet to detect first 300 bytes.

Signed-off-by: Carton He <cartonhe@gmail.com>
2020-12-29 21:15:36 +08:00
Carton He fe726d2ee3 parse_file: fix "decoded" may not be initialized issue
if "encoding" parameter not None.
2020-12-23 00:19:19 +08:00
Carton He 7b28a8d7e4 Fix [tt] caused exception on small boards
For board <= 19x19, according to https://www.red-bean.com/sgf/go.html:

A pass move is shown as '[]' or alternatively as '[tt]' (only for boards
<= 19x19).
2020-12-23 00:19:04 +08:00
Carton He 9b09e9b65d fix ValueError when converting empty string KM to float in sgf parser
Some sgfs has "KM" property with empty value, this could cause
ValueError exception.
2020-12-06 23:35:25 +08:00