waltheri / wgo.js

JavaScript library for game of Go.
http://wgo.waltheri.net/
306 stars 127 forks source link

Switching between several variations. #58

Open d180cf opened 8 years ago

d180cf commented 8 years ago

Here is a simple tsumego with 3 variations:

(;FF[4]SZ[7]MA[ac]
 C[B => W][B+1 => W][W => W+aa,ab,ba,bb,ca,cb,da,db]
 AB[fa][fb][fc][ad][bd][cd][dd][ed][fd]
 AW[ea][eb][ac][bc][cc][dc][ec]
 SL[aa][ab][ba][bb][ca][cb][da][db]

    (;AB[aa][ca][cb][bb]
      AW[ab]
      C[B => W][B+1 => B+da,db][W+1 => W])

    (;AB[aa][ba][ca][cb]
      AW[bb][da]
      C[B => W][W => W])

    (;AB[ba][da][cb]
      AW[bb]
      C[B => W][W => W][W+1 => W+ab][B+1 => B+ca,ab]))

Wgo is able to display the first position and can also swicth to the 1st variation if I click the > button. However it's not able to display the other two variations.

waltheri commented 8 years ago

SGF file is parsed correctly, there is just no place to show the other variations - WGo player doesn't have any variation tree. Do you have any suggestion how to change variations in this case?

d180cf commented 8 years ago

If there were a couple buttons - next variation and previous variation - it would be possible to switch them.

goplayerjuggler commented 6 years ago

Because of this limitation I will need to use a different library for displaying toroidal Go with variations. (WGo.js works fine when there are no variations.) http://goplayerjuggler.blogspot.co.uk/2017/06/t-go-viewer-for-little-golem.html