[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Check out Janggi (Korean Chess), our featured variant for December, 2024.
I suppose that the GAME code runs as part of the PHP script that delivers the Game Courier web pages. Perhaps it would be a good idea to make GAME code support a 'clientinclude' command similar to 'include' (which is a 'serverinclude'), where one could specify a URL? The generated page could then contain a <script src="..."> tag at the bottom of the page referring to that URL. This would offer a way to include JavaScript dedicated to a particular variant, that would not be of much general use.
BTW, if there is going to be a lot of JavaScript in these pages, it would save bandwidth to move it to a separate file (which could be cached, both on Cloudfare and in the user's browser cache), and have the page refer to that file, rather than including it in the (non-cacheable) page itself.
[Edit] Something I noticed: after using the won or lost command a message "<!-- has won -->" appears in the game record. But after the drawn command, it still prints "White/Black to move" there. It does apparently realize the game is finished, because it does stop highlighting moves.