Check out Smess, our featured variant for February, 2025.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sat, Aug 22, 2020 06:02 AM UTC in reply to Fergus Duniho from Fri Aug 21 09:26 PM:

One interpretation is that an incomplete move is being allowed, and a continuation will be required on the next step. The second interpretation is that it is a complete legal move by itself. The third interpretation is a mishmash of the first two. It is that it is an incomplete move as written, but adding pass as the second part will make it a complete legal move.

The way I look at it is that it is a legal move by itself, but that pass sometimes has to be added to 'complete' it, as a kludge to tell that to the GAME code and prevent the infinite loop. And this problem is self-inflicted, by a mismatch between the GAME code and the JavaScript. With the enhanced JavaScript there never is a need to submit incomplete moves. But with the old JavaScript it could not be avoided (other than by typing) that a spurious (partial) move would be sent after entering the first leg, and the GAME code would have to be prepared to deal with that, using continuemove to ask for a second leg, with the risk for an infinite loop if there was none. Even in that setting adding of the pass could have been avoided by having the GAME code set a 'constant' that would enable it to distinguish between runs without or after a continuemove, like $answered allows it to distinguish between a run before and after deferring a promotion choice.

So perhaps I did indeed adopt a cumbersome solution; the logical one would be to simplify the Post-Move code to consider simple moves always complete, and never use continuemove on them. That would exclude interpretation 1, and thus also 3. As it is now I am using one kludge (in the JavaScript) to work around another (in the Post-Move GAME code). As long as the old JavaScript is still around, though, I don't want break my GAME code for working with it.

From the POV of the JavaScript there still will have to be some way the user can indicate whether he is done entering the move, when the legalList indicates that there is an optional continuation. Clicking the last-clicked square a second time (and hence making sure it is highlighted) is the natural way to indicate that. It is the only click that cannot possibly indicate the location of a new side effect.