[ 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.
I have added the pieces system variable. This is the array stored in a set file. Its keys are piece labels, and its values are the filenames of image files. It basically tells which graphics to use for the pieces. I also fixed things so that you can set or get specific values of this array. This is done by following the variable name with a period and the element name. Because this will not work for labels that include periods, I have also added the pieceimg operator. This returns a specific element of the $pieces array.
The point of this is to make it even easier to support multiple sets when matching sets have not been provided. It can also be used to eliminate the need to use aliases. Here is how it may be used:
Or just:
Although you could have edited $pieces directly, this has the advantage of stripping $pieces of all the pieces you will not be using in your game.