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

Play-test applet for chess variants. Applet you can play your own variant against.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Jan 12, 2024 12:51 PM EST in reply to Fergus Duniho from 09:18 AM:

If I set things up so that constants of @pieces and @dir automatically replace $pieces and $dir, then this would let the correct pieces show up even in Edit mode.

Using constants may not work, as they are stored in the log, and the case where using variables doesn't work is in Edit mode, where no log has been loaded.

Maybe I could create a new variable type of super constants, or I could use a @superconstants constant to designate constants that override system variables.

Adding super constants to the settings file might work, but I should probably create a separate field for that instead of doing it in the GAME Code program. I'm currently thinking of creating a new set that copies values from super constants instead of containing fixed values.

But instead of allowing just one set like this, I would like to allow the option of creating multiple custom sets that would belong to the same group. They could all start with the string customset, and any that exist could be placed in a Custom group, allowing players to switch between them. They could then be described as multi-dimensional arrays of the variables set in a set file.

Another possibility is to accept json-encoded arrays as values for $set. ... Even the json array might allow someone to change arbitrary variable assignments without some restrictions in place.

If I just create a new variable that takes a json encoded array as its value, this would not interfere with other settings, and it could be broken down into values that are selectively used. If it contains other extraneous values, they could be ignored.