Check out Modern Chess, our featured variant for January, 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

About Game Courier. Web-based system for playing many different variants by email or in real-time.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Mon, Nov 20, 2023 03:49 AM UTC:

Games with a rank label of 0 don't display correctly, as can be seen in Apothecary Chess Modern. It looks right if the rank label 0 is replaced with something else

Another game with this problem is Rococo

Now that Daniel brought this problem up, I should also note that presets with a Max Columns value of 0 don't display, only showing the following text.

When cols is zero, you don't have a board. Exiting before it tries to divide by zero.

An example is my old Hook Shogi preset and other old presets, for which I did because I was younger and less experienced.

Thankfully, this is very easy to fix. Throw in a clause in the script that forces the Max Columns value to be 1 if the field is evaluated to be 0.

Pseudocode, assumes val("Max Columns") has been pre-validated to let only integers through.

if (val("Max Columns") == 0) { cols = 1; } // Set Max Columns to 1 to prevent dividing by 0 or a negative number

else cols = Math.abs(val("Max Columns")); // Valid value (take absolute value to ensure proper division)