Check out Symmetric Chess, our featured variant for March, 2024.


[ 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

Chess. The most popular of Chess variants, Chess itself. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Mon, Mar 27, 2023 08:01 PM UTC in reply to Fergus Duniho from 06:20 PM:

The HTML table for the board (including style specifications for the size of the cells) is created in the HTML element with class="idiagram" when the page gets loaded, based on the variable settings resulting from the parsing of the description that initially was inside this element. To have later changes in the parameters describing the board (like number of files and ranks, square size, rank numbering, rim color, whole-board background image) take effect, you have to call CreateBoard(0, 1). (The 0 here indicates the Diagram number on the page, which starts counting at 0, top to bottom, so this assumes there is only a single Diagram on the page.)

Things like background color of the squares are applied during display of a new position, which can be ordered through calling Display().