Check out Modern Chess, our featured variant for January, 2025.

Enter Your Reply

The Comment You're Replying To
H. G. Muller wrote on Sat, Aug 22, 2020 06:50 AM UTC in reply to Fergus Duniho from 01:49 AM:

I will delay removing them until tommorow, since H.G. currently has code that is using them.

OK, thanks, I have grabbed them now from movepiece.js so I can put them in an adapted script if needed.

I tried the new JavaScript in Mighty Lion. If the Lion captures an adjacent Pawn (l d6-e5) by clicking the latter twice, the move is submitted, but the Post-Move code does ask for a second leg because no pass was appended. Based on the reasoning in the previous comment, this should be considered as a flaw of the Post-Move code, though; it should just have accepted the move. Then this would have worked fine.

More serious is that when I try to play a distant Lion move beyond the Pawn (e.g. l d6-e4) it does not immediately accept the move, but still wants me to choose between the simple move and "l d6-e5; l e5-e4", highlighting both e4 and e5 to make that choice. This is a consequence of the "any order" policy, rather than using the order of entry of clicks 2 and 3 to distinguish between the shooter and the multi-mover case. Highlighting e4 and e5 here would have been desirable for the Forest Ox (a shooter, which would have indicated that by specifying the move as "l d6-e4; @-e5", requesting click order d6-e4-e5). The Lion is a multi-mover, though, and should have required d6-e5-e4 for taking the Pawn, while d6-e4 should already have been an unambiguous expression of the desire to not take the Pawn.

For me that issue is still important enough to prefer my own adaptation of the JavaScript. In connection with that I have some questions:

  • Currently the JavaScript array legalMoves[] is still on the Game Courier pages, and my adapted version, as well as some JavaScript embedded in the page that decides what the "How to move pieces" section should say still test for its presence. But since the new movepiece.js does not refer to it at all, I suppose it is scheduled for removal. Is it safe to assume that all future scripts will define legalList as null for presets that do not show legal moves, and that I should test that?
  • Would it be possible for an editor to rename the file /membergraphics/MSgame-code-generation/movepiece.txt to movepiece.js? Once the name exist I will be able to update it in the normal way. Then I could make presets that want to use it just contain the link to that file. As it is I would have to put the entire script in the page itself. And these are non-cached pages, typically loaded many times during a game.
  • A minor inconvenience is that the text editor for the 'Rules, written in HTML' field in the Edit screen for presets starts in WYSIWYG mode, which strips the HTML of any existing content of that section from everything it doesn't know, in particular script tags, before you even get a chance to see it. If it would start in 'Source Code' mode, as it does in the submission for for member-contributed articles, the original content would be respected, and people that do not want to use any special HTML there can still easily switch to to WYSIWYG. I do like that text editor very much; even in source-code mode it is very helpful in indenting HTML tags and JavaScript, pointing out imbalanced tags and such. But that switching to WYSIWYG mode can lose you so much source definitely is a risky feature of it.

Edit Form

Comment on the page Game Courier Developer's Guide

Conduct Guidelines
This is a Chess variants website, not a general forum.
Please limit your comments to Chess variants or the operation of this site.
Keep this website a safe space for Chess variant hobbyists of all stripes.
Because we want people to feel comfortable here no matter what their political or religious beliefs might be, we ask you to avoid discussing politics, religion, or other controversial subjects here. No matter how passionately you feel about any of these subjects, just take it someplace else.
Avoid Inflammatory Comments
If you are feeling anger, keep it to yourself until you calm down. Avoid insulting, blaming, or attacking someone you are angry with. Focus criticisms on ideas rather than people, and understand that criticisms of your ideas are not personal attacks and do not justify an inflammatory response.
Quick Markdown Guide

By default, new comments may be entered as Markdown, simple markup syntax designed to be readable and not look like markup. Comments stored as Markdown will be converted to HTML by Parsedown before displaying them. This follows the Github Flavored Markdown Spec with support for Markdown Extra. For a good overview of Markdown in general, check out the Markdown Guide. Here is a quick comparison of some commonly used Markdown with the rendered result:

Top level header: <H1>

Block quote

Second paragraph in block quote

First Paragraph of response. Italics, bold, and bold italics.

Second Paragraph after blank line. Here is some HTML code mixed in with the Markdown, and here is the same <U>HTML code</U> enclosed by backticks.

Secondary Header: <H2>

  • Unordered list item
  • Second unordered list item
  • New unordered list
    • Nested list item

Third Level header <H3>

  1. An ordered list item.
  2. A second ordered list item with the same number.
  3. A third ordered list item.
Here is some preformatted text.
  This line begins with some indentation.
    This begins with even more indentation.
And this line has no indentation.

Alt text for a graphic image

A definition list
A list of terms, each with one or more definitions following it.
An HTML construct using the tags <DL>, <DT> and <DD>.
A term
Its definition after a colon.
A second definition.
A third definition.
Another term following a blank line
The definition of that term.