The Chess Variant Pages
Custom Search

Enter Your Reply

The Comment You're Replying To
H. G. Muller wrote on 2016-10-11 UTC
files=9 ranks=10 promoZone=5 promoChoice=Q graphicsDir=/membergraphics/MSelven-chess/ whitePrefix=w blackPrefix=b graphicsType=png darkShade=#C8E0A8 lightShade=#F0FFC0 startShade=#70C060 symmetry=mirror pawn::fW::a4,c4,e4,g4,i4 pawn (passed):Q:fsW:pawn: advisor::F:ferz:d1,f1 elephant::afF::c1,g1 horse::afsW:horse:b1,h1 cannon::::b3,h3 rook::::a1,i1 king::WfafyafcW:wazir:e1


The question came up whether interactive diagrams could handle a zonal board like that of Xiangqi. The answer is 'yes', but not without adding a tiny bit of script next to the regular specification of the diagram, to specify which pieces cannot go where. To demonstrate that, I posted the diagram on the left.

The part I am not very happy about is the description of the non-facing rule for the Kings in Betza notation, though. For clarity this should have been fcR, where the zonal restriction of the King would suppress everything outside the Palace, but can make an exception for moves that land on a King. But unfortunately that would leave fD captures inside its own Palace, when the King is on the back rank.

I solved that now by defining the forward slide as starting with a lame leap of 3 squares (to make sure the King gets out of its own Palace) before sliding as a Rook for the remaining part of the path. This leads to an ugly multi-leg description, first two move-only Wazir steps, and then a range-toggle ('y') to turn the Wazir atom into a Rook. It would have been nice if there had been a Betza modifier 'k' to indicate 'capture king only'. Then the move could have been written as fkR. But this is a very exceptional case, and it is probably not wise to dedicate one of the few still available letters for such an uncommon task. Perhaps it would be better to allow diacritical markings to commonly used modifiers to indicate they are somehow restricted. Like c" for 'capture, but only royals', and p' for 'must hop, but not over enemy pieces'. The full Xiangqi King move would then be Wfc"R.

Extra scripting

To get the above result two JavaScript functions that the general diagram script optionally uses had to be supplied:

  • BadZone(x,y,piece,color) to confine pieces to a limited part of the board
  • Shade(x,y) to define a board coloration different from the normal checkering

Both these functions are expected to return 0 or 1, in the latter case to indicate whether squares are dark or light, in the former case whether the piece is not allowed at the given location.

Edit Form

Comment on the page Chinese Chess page

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.

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.