The Chess Variant Pages

[ 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

Xiangqi (象棋): Chinese Chess. Links and rules for Xiangqi (Chinese Chess). (9x10, Cells: 90) (Recognized!)[All Comments] [Add Comment or Rating]
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.