yzyray/lizzieyzy

When saving an 18x18 game with a pass move, LizzieYZY writes an illegal SGF

Opened this issue · 1 comments

LizzieYZY appears to write the pass move as "B[ss]" or "W[ss]" when saving a new SGF file with pass moves during the game for 18x18 games. This is illegal and results in an invalid SGF that other SGF editors I have tried are sometimes unable to interpret correctly. I am guessing that this is probably due to logic that attempts to write a pass move using the coordinates of "boardsize+1, boardsize+1", which for 19x19 would be "tt" and for 18x18 is "ss".

However, this logic isn't correct. See the SGF file specification here: https://www.red-bean.com/sgf/go.html#types
The specification indicates that if you plan to use a notation like "B[tt]" or "W[tt]" to indicate a pass, it needs to be exactly "tt" for all boardsizes <= 19, rather than "ss", or "rr", etc. for smaller boards.

However, according to the specification this notation is deprecated and is only allowed for compatibility for old SGF file formats. A simpler notation that is valid for all boardsizes would be to use "B[]" or "W[]" to indicate a pass. This appears to be the only legitimate way to encode a pass for board sizes > 19, and it's preferred because it works uniformly for all board sizes.

yzyray commented

Thanks.
You are right about "write a pass move using the coordinates of "boardsize+1, boardsize+1"".
Use "B[]" or "W[]" to indicate a pass seems clean,I'll use it in next version.