artasparks / glift

Go Lightweight Frontend
MIT License
115 stars 33 forks source link

problemCondition not recognized if opponent has the last move in the "correct" variation #122

Closed ghost closed 8 years ago

ghost commented 9 years ago

In this "copy this joseki"-style problem, Black has the first move, but White ends the sequence. Although the last node has a GB[] property, the STANDARD_PROBLEM viewer does not show the check mark. If I remove the last move and add GB[] to the B[dn] move, it works.

(;AB[mc][pd][qd][oe][of][pf][cp]AW[lc][oc][md][od][ne][pe][eq]C[Copy this joseki.]
CA[UTF-8]FF[4]GM[1]PL[B]SZ[19];B[gq];W[do];B[dp];W[ep];B[eo];W[fo];B[en]
;W[gp];B[dn];GB[]W[hq])

Normally the player whose turn it is to solve the problem will also have the last move, but there are problems such as this where I'd like to show a sequence for both, so the opponent can have the last move.

artasparks commented 9 years ago

What if there was a problem-playthrough option?

I think that it's still correct to put GB on the Black B[bn] move -- since that represents the correct sequence for black -- the player playing the problem. However, I supposed could add an option that would play the last opponent's move -- if such a move existed.

It's possible that I could make this the default behavior too.

ghost commented 9 years ago

I agree GB[] should be on B[] nodes, but the same applies with problemConditions: { C: ['RIGHT'] }.

The way EasyGo for iOS and Guo Juan's training system implement this - as far as I can see -, and I think it makes sense,is that if the final node in a variation is marked as correct, then the problem is considered correct, no matter which other properties that node has.

artasparks commented 9 years ago

How do EasyGo and the GuoJuan training system deal with wrong-variations? Usually, problems list not only the correct variations but also some incorrect variations with some explanation.

ghost commented 9 years ago

EasyGo lets you play out the wrong variation, then shows a big red cross with a button to restart the problem. If you click on a position that's not in the tree, it just briefly flashes a red cross at that position and doesn't play the stone.

See the first demo video on http://www.easygo361.com/videos/

I also like, as shown in that video, how in the problem exploration moves that lead to a correct node are shown with green dots, whereas moves that don't are shown with a red dot.