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 Fri, Aug 21, 2020 06:00 AM UTC in reply to Fergus Duniho from Thu Aug 20 10:24 PM:

Since enforcing and showing legal moves usually requires some separate code, there can sometimes be a discrepancy between the legal moves that are enforced and the legal moves that are shown. Players are allowed to purposely enter moves that are not shown as legal as a way of getting around this when it happens.

Indeed, I already thought this would be the purpose of the popup. The code in the betza.txt file could also suffer from such a discrepancy, because I am using a shortcut for testing legality of the moves to be highlighted, different from a full king capture test used on the move that is played, and there could be cases I overlooked where the shortcut is not entirely accurate. At the moment this is certainly the case for the anti-trading rules, (but that would cause illegal moves to be highlighted, not the other way around), and moves of an imitator (where the shortcut doesn't take into account yet that the move will be altered because of the one we want to test for legality).

Another thing I ust noticed:

The 'menu' page for a preset used to highlight moves for a piece that you clicked. (But you could not click a destination; then they simly went off again.) This no longer works, because there is no 'messagearea' on that page. Not that it would be useful to have one. But perhaps you should make the JavaScript test whether getElementById returns null, and make execution of the code that accesses it conditionally dependent on that, for otherwise it crashes the script.