[ 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.
Xiangqi
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:
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.