Check out Makruk (Thai Chess), our featured variant for March, 2025.


[ 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 Sat, Apr 19 08:02 PM UTC in reply to Fergus Duniho from 02:51 PM:

Indeed, in the modern version shown here the piece confinement doesn't need scripting anymore, but can be done with morph definitions. Enforcing the 'face off' rule can now simply be done with an fkR move on the Kings. For a non-checkered board shading one still has to provide a custom script, though. The I.D. looks for a function xxxShade(x, y) on the page, where xxx is the value of the satellite parameter. This function can return a 0 or 1 for selecting the defined light and dark shades, or a string like '#123456' for defining an arbitrary other color.

The best way for doing what you want is probably to make what that function returns dependent on some parameter that can be set by the buttons that select the theme. Unless you define the light and dark shades as transparent in all cases, and then provide a whole-board image for each of those. (And assign that to the variable background when the corresponding button is pressed.)

satellite=xiang files=9 ranks=10 maxPromote=0 graphicsDir=/membergraphics/MSelven-chess/ whitePrefix=w blackPrefix=b graphicsType=png lightShade=#F0FFC0 darkShade=#70C060 symmetry=mirror pawn::fW::a4,c4,e4,g4,i4 morph=P/P/P/P/P pawn (passed)::fsW:pawn: advisor::F:ferz:d1,f1 morph=!!!.../"/"/!/!/!/!/!!!.../"/" elephant::afF::c1,g1 morph=!/!/!/!/! horse::[W-F]:horse:b1,h1 cannon::::b3,h3 rook::::a1,i1 king::WfcR:wazir:e1 morph=!!!.../"/"/!/!/!/!/!!!.../"/"