clamshell icon indicating copy to clipboard operation
clamshell copied to clipboard

Add a converter for PlayerBlack/PlayerWhite

Open artasparks opened this issue 4 years ago • 0 comments

We should add a converter for the PlayerBlack & PlayerWhite properties + fields in the GameInfo struct in node.go: https://github.com/otrego/clamshell/blob/master/core/movetree/node.go

Extra care will need to be paid to ensure that comments are escaped correctly. In particular, ] characters should become \]. Currently the parser does the unescaping for comments.

  • Property: https://www.red-bean.com/sgf/properties.html#PB, https://www.red-bean.com/sgf/properties.html#PW,
  • Property example: PB[kashomon]
  • Converters: https://github.com/otrego/clamshell/blob/master/core/prop/converter_list.go. The Move converter is probably a good one to look at.

Should have unit tests that test positive & error cases

artasparks avatar Dec 16 '20 02:12 artasparks