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

Game Courier History. History of the Chess Variants Game Courier PBM system.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Sat, Feb 8, 2020 06:03 PM UTC:

I am deprecating the use of global and setglobal as aliases for system and setsystem. I would like to eventually eliminate these from the language, since global variables have a different meaning in the language.

I have limited the power of the system built-in function. While it had prevented people from viewing a password with it, it did allow you to enter "system GLOBALS" to view all the variables, which could be a big security risk. I changed it to return values only from a whitelisted set of system variables. These correspond to the same ones that may be set with setsystem.

I introduced the use of the dollar sign as a system variable designator. When appearing at the beginning of a variable name, it will return the value of the corresponding system variable if it has been whitelisted. I also added support for $old and $moved, which return the values of $lastcaptured and $lastmoved. Since the dollar sign is also the designator for PHP variables, it is basically a way to get the values for some of the PHP variables with the same name. You may also think of the S in $ as standing for system.

Game Courier is already set up to recognize old, moved, origin, and dest as values of system variables, but I don't like this, because it prevents these from being used as ordinary words, and it might make the code more confusing if you don't already know their meaning. The use of $old, $moved, $origin, and $dest should now be preferred, though I can't phase out the old way without rewrting lots of code. I have at least made the changes in the new fairychess settings file for Chess, so that they can be used going forward.