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]
🕸📝Fergus Duniho wrote on Sat, Apr 26 05:25 PM EDT in reply to H. G. Muller from 10:43 AM:

I have been thinking. When you want separate buttons for board and pieces, the board buttons must leave the pieces alone, and vice versa.

I now have SELECT elements for individually changing the set and board while I still use buttons for the themes. The buttons will update the values of the SELECT elements to tell which set and board are being used. Both the buttons and the SELECT elements call the changeTheme() function. To get it to work properly, I had to make graphDIR a global variable outside the function, as betzaCSS.js did not already declare it to be one. To keep the set or board from changing when I just mean to change one, the function retrieves its value from the appropriate SELECT element and reapplies it. To handle this, the setTheme() function can take a value of 'same' for either set or board.