Check out Glinski's Hexagonal Chess, our featured variant for May, 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 05:53 PM UTC in reply to Fergus Duniho from 01:37 PM:

OK, I see what you are trying to do now: change the pieces in a Diagram that already has been created through a button. The problem is that the definition lines for the pieces are processed when the Diagram is first created. At that time the field defining the image is stored in an array imag[], and suffixed with a dot and the graphicsType. The image URL is created at display time, by concatenating the graphicsDir, color prefix and imag[n].

So you would have to modify imag[n] for n=1 to nType, and set those to the required filenames (including extension, but without color prefix or directory path). In the articles where I used buttons to swicth the graphics (like Chu Shogi) I avoided that by making the root names for all piece sets equal, and distinguish them by white and blackPrefix.