[ 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.
The King-facing rule can be implemented by adding a fkR move to the King; k means a move that can only be used to capture royals.
There is no way to configure the Interactive Diagram for confinement zones (i.e. by specifying some additional parameters in the definition). This is mostly because I could not imagine a sufficiently flexible and easy way for specifying the zones, and what pieces should be confined to those. So instead I did make the Diagram script extendable by a user-supplied JavaScript function BadZone(file, rank, piece, color), which can return true (1) or false (0) depending on whether a move of the mentioned piece type (numbered as they appear in the Diagram's definition) to then mentioned square (file and rank counting starting at 0) should be forbidden.
By embedding such a function within <script> tags in the HTML page, the Diagram would automatically call it for verifying each move. You can see an example of it in the diagram I made for Xiangqi, at https://www.chessvariants.com/index/listcomments.php?id=33312 , when you ask your browser to show the Page Source of that page.
You can also see there how a user-supplied function Shade(file, rank) can be used to alter the coloration of the chess board (which by default would be checkered).