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 ]

Comments by FergusDuniho

EarliestEarlier Reverse Order LaterLatest
Server crash[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Tue, Sep 21, 2021 12:49 PM UTC in reply to dax00 from 11:18 AM:

I can't access my game that was interrupted. I hope that timed-out games (due to the site being down) will be playable soon.

It appears that the problem with your game affects only Chu Shogi, and it has nothing to do with the game being interrupted, as I encountered the same problem when I tried to simply move pieces in Chu Shogi. What happens is that the page stops displaying partway through the menu, and it doesn't give me any clear indication of what is wrong. It looks like this is going to be a problem for Adam DeWitt to solve, as it stems from his chu settings file.


🕸Fergus Duniho wrote on Wed, Sep 22, 2021 06:35 PM UTC:

The new server is running PHP 8. So, I have updated some scripts over there to work with PHP 8, and I have copied the updated versions to the main server. These include the following:

  • 404.php
  • footer.php
  • ads/adlocale.php
  • index/commentsinc.php
  • index/database-funcs.php
  • index/displayusersubmission.php
  • index/fpd-indexing-funcs.php
  • login/header.php
  • play/pbm/play.php

One change is that {curly brackets} may no longer be used to specify characters within a string. [Square brackets] must be used instead, as they are already used for array elements. The other is that parentheses must now be used to specify the order of evaluation for nested ?: statements.

I will check more pages later to see if any more scripts need updating.


🕸Fergus Duniho wrote on Wed, Sep 22, 2021 09:45 PM UTC:

I have made additional changes to the following scripts on both servers:

  • footer.php
  • index/database-funcs.php
  • index/drawemail.php
  • index/editcomment.php
  • index/listcomments.php
  • index/login-funcs.php
  • index/randgame.php
  • play/pbm/drawdiagram.php
  • play/pbm/logs.php
  • play/pbm/play.php

Apothecary Chess Tournament[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Thu, Sep 23, 2021 02:39 PM UTC in reply to Aurelian Florea from 10:03 AM:

I still see time on the clocks, and I already gave additional time to all interrupted timed games. I'll do some testing later if he still hasn't moved.


McCooey's Hexagonal Chess. Chess on a board, made out of hexes. (Recognized!)[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Thu, Sep 23, 2021 02:45 PM UTC in reply to Kevin Pacey from 02:25 AM:

My opponent sent an email to me saying he cannot move in the following log:

https://www.chessvariants.com/play/pbm/play.php?game=McCooey%27s+Hexagonal+Chess&log=panther-tim_olena-2021-204-636

He's in check and has few legal moves. Also, the ASCII diagram he is using will not display legal moves or allow moving with the mouse. I was able to get as far as previewing a move after changing the rendering method. Not being him, I couldn't go any further.

UPDATE: Upon further testing, I found no problem with being able to move. I created a test log that just changed userids, and I successfully moved. Since the log had no time controls, the time the site spent offline had no effect on anything.


Apothecary Chess Tournament[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Thu, Sep 23, 2021 05:39 PM UTC in reply to Aurelian Florea from 10:03 AM:

I made a test copy of one of these games, and I successfully moved in it. If Oisin had around two days left, that's consistent with him having less than a day now, because the site has been back online for a few days already. Tell him to move before his time runs out.


@ Fergus Duniho[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Sep 24, 2021 06:46 PM UTC:

Testing whether posting here meets same error as posting on new server.


Backups[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sat, Sep 25, 2021 02:50 AM UTC:

I have set up some cron jobs to do backups with rsync. On this server, rsync will create hourly, daily, weekly, monthly, and annual backups. These are in case it's important to revert a change to a script or page. Editors with access to the server can find these in /home/chessvariants/backups/.

The new server has a cron job to make a daily backup of the public_html directory on this server. I set up an SSH key pair to allow it to do this without a password. This will copy the /public_html/ for chessvariants.com to that for chessvariants.org. This is expected to happen at midnight EST. To be sure of what time it does it, I'll check the timestamp on the /public_html/ directory tomorrow, since I also made the script use the touch command on it when it is done updating. I still have not added commands for backing up the database. It will be important to do both together to keep their backups in sync.


Comemnt search doesnt work[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sat, Sep 25, 2021 12:33 PM UTC in reply to Bn Em from 11:00 AM:

It depends on a feature of MariaDB 10, but when I restored the server earlier this year, MariaDB 10 was frequently losing the connection to the database, and MariaDB 5 proved more reliable. So, I switched to MariaDB 5 and manually removed the details that required 10. On the new server, I have installed Rocky Linux 8, PHP 8, and MariaDB 10. Since it also has reverse DNS, which should make email more likely to be delivered, I have plans to make it the main server when everything is working correctly on it. For now, I have to update scripts to work with PHP 8. The new server has less storage space, but it has more than enough for the site. It has less RAM, but this server usually doesn't use even half the available RAM. Both sites have 4 cores, and the new VPS uses faster CPUs. Although the new server is on chessvariants.org, it will not support comment search until I add support for this back into the database. To start with, I will look into updating to MariaDB 10 on this server.


Backups[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sat, Sep 25, 2021 01:05 PM UTC in reply to Fergus Duniho from 02:50 AM:

The touch command was used on the new server's /home/chessvariants/public_html/ directory at 12:00:14 AM EST. So, the automated daily backup worked when it was expected to. I'll look into including a backup of the database into the same script today. But since there are some different files in the folders for the database on each server, I want to fix that by making them both use the same version of MariaDB.


Comemnt search doesnt work[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sat, Sep 25, 2021 06:37 PM UTC:

My attempt to update chessvariants.com to MariaDB 10 has not been successful, and I have been unable to revert to MariaDB 5.5 without errors. So, chessvariants.com is currently without a working database. At least I made a backup and copied it to chessvariants.org. If the problem on chessvariants.com continues, I might not continue with HostSlayer. As long as I have things backed up on RackNerd, I may try reinstalling the OS on HostSlayer. But for now, I have floaters in my eyes, and I need to have lunch.


🕸Fergus Duniho wrote on Sun, Sep 26, 2021 12:58 AM UTC:

Since I haven't gotten MariaDB to work on the original server, I switched the domains of the servers. However, there are still things to fix, and I still have to deal with the original server.


🕸Fergus Duniho wrote on Sun, Sep 26, 2021 01:25 AM UTC:

There appears to be some kind of corruption from the MariaDB 10 installation that is preventing a reinstallation of MariaDB 5.5 from working. When I check its status after reinstalling version 5.5, it says "Failed to start MariaDB 10.6.4 database server." I expect I will have to reinstall CentOS, but I don't want to get it started right now, because it is late. Unfortunately, the new VPS also seems to be having issues with MariaDB 10. It frequently loses connection with the MySQL server, and I have to refresh a page a few times before it connects.


🕸Fergus Duniho wrote on Sun, Sep 26, 2021 05:56 PM UTC in reply to Bn Em from Sat Sep 25 11:00 AM:

Are there any plans to restore this functionality?

I tried to yesterday and failed. I have not been able to get MariaDB 10 to work reliably on either server, HostSlayer or RackNerd. It used to work before I tried updating the HostSlayer VPS to Rocky Linux via updating to CentOS 8 first. So, maybe there is some setting that has to be corrected. For now, chessvariants.com runs on HostSlayer with CentOS 7, PHP 7, and MariaDB 5.5, while chessvariants.org runs on RackNerd with Rocky Linux 8, PHP 8, and MariaDB 10. Until I can get things working correctly on the new RackNerd VPS, I will continue to use MariaDB 5.5, and comment searching will remain disabled.


Pandemonium (Surajang修羅場). Capablanca chess + Crazyhouse.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Sun, Sep 26, 2021 08:29 PM UTC in reply to Daphne Snowmoon from 10:01 AM:

Try using only alphanumeric and punctuation characters found in ASCII in your file names. Korean letters may not be recognized by all software.


🕸Fergus Duniho wrote on Mon, Sep 27, 2021 01:42 PM UTC in reply to Daphne Snowmoon from 06:33 AM:

On my iPad, Safari's Reader mode is skipping the whole Pieces section. Without Reader mode, things look fine in both Safari and Chrome. I also tried Firefox's Reader mode on my Likebook Mars. It did not skip the Pieces section, though it did mess up your ASCII diagram.


🕸Fergus Duniho wrote on Mon, Sep 27, 2021 01:52 PM UTC in reply to Daphne Snowmoon from 01:46 PM:

It might be. It looks like Safari's Reader mode makes inappropriate decisions about what to exclude. In another page I looked at, it showed the Pieces section but skipped the Rules section. My advice would be to not use its Reader mode on this site. It should be unnecessary anyway, since mobile pages here leave out sidebar ads.


🕸Fergus Duniho wrote on Mon, Sep 27, 2021 05:35 PM UTC in reply to Daphne Snowmoon from 01:46 PM:

I fixed the problem by no longer enclosing each section in SECTION tags.


🕸Fergus Duniho wrote on Mon, Sep 27, 2021 08:55 PM UTC in reply to Ben Reiniger from 08:39 PM:

Okay, I closed the A tags, and now the text is no longer red in regular mode, and it's no longer blue in Reader mode.


Backups[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Mon, Sep 27, 2021 09:06 PM UTC:

I now have a script set up that runs from the backup server to make daily backups of both the /home/chessvariants/public_html/ directory and the chessvariants database every midnight at Eastern Standard Time. The script looks like this, but with the actual database password. It doesn't need the server password, because it is using an SSH key pair to connect.

#1/bin/bash
mv /root/chessvariants.sql /root/chessvariant-backup.sql
ssh [email protected] mysqldump --opt --user=root --password=XXXXXX chessvariants > /root/chessvariants.sql
/usr/bin/rsync -ae ssh --delete [email protected]:/home/chessvariants/public_html/ /home/chessvariants/public_html/
touch /home/chessvariants/public_html/
mysql --password=XXXXXX chessvariants < /root/chessvariants.sql

Game Courier Settings Files. Keep track of all the settings files you have written for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Wed, Sep 29, 2021 09:22 PM UTC in reply to Ben Reiniger from 04:52 PM:

I'm open to feedback on how best to manage this sort of thing. One possibility is to create a new Item with the new name, we can move over the references in the database I've mentioned, and leave the old page with just a link forwarding to the new page (possibly even an automatic redirect, though I'm not sure if that'd work in a member submission view script).

The database has a RelocatedPages table. Just add an entry that includes its old URL and its new ItemID, and the 404 script will take care of the details.


Yangsi. A very playable chess variant with 12 different pieces on a 10x10 board.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Thu, Sep 30, 2021 12:11 PM UTC in reply to A. M. DeWitt from 02:35 AM:

See the Ai Ai tag at the bottom of the page.


Game Courier Settings Files. Keep track of all the settings files you have written for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Thu, Sep 30, 2021 04:28 PM UTC in reply to A. M. DeWitt from Wed Sep 29 02:54 PM:

I decided to rename Futashikana Shogi to Dai Shosu Shogi.

While it has apparently been done, or is in the process of being done, I would like to advise against renaming in general. When you release a game, it takes on a life of its own that may extend outside of this site. While I was working on the taginfo.php script today, I was testing it with the Ai Ai tag, and one line on the page was displaying as empty. When I tracked down what was causing this, it was the ItemID for Futashikana Shogi. Apparently, someone has programmed Futashikana Shogi for Ai Ai, where it remains known by that name and not by the name Dai Shosu Shogi.

Additionally, the name has been changed without updating the RelocatedPages table. This table should have a row added to it for each page whose URL and ItemID both change. It may be done by editing the table in PHPMyAdmin, which the main editors have the URL, userid and password for.

When the page gets rewritten, it should mention the original name and why the name was changed.


🕸📝Fergus Duniho wrote on Fri, Oct 1, 2021 06:25 PM UTC in reply to A. M. DeWitt from Thu Sep 30 04:41 PM:

After thinking about it, I decided to cancel the renaming of Futashikana Shogi. Please delete both presets for Dai Shosu Shogi.

It looks like someone has taken care of this.


About Game Courier. Web-based system for playing many different variants by email or in real-time.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Sun, Oct 3, 2021 01:23 PM UTC in reply to Daniel Zacharias from 04:42 AM:

I was looking for a global way to eliminate some PHP warnings, but that requirement proved to be too restrictive. So, I have removed it.

I then tried requiring minimal argument counts instead, but even that caused problems for unary, binary, and mixed unary/binary operators. But since they seemed to work with operators requiring 3 or more arguments, I left those minimal argument count requirements in.


Game Courier Settings Files. Keep track of all the settings files you have written for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Mon, Oct 4, 2021 01:02 PM UTC in reply to Aurelian Florea from 09:28 AM:

Thanks for reporting this. Although I'm doing most of the development over on the other server, I do copy over changes toward the end of the day after they seem to be working, and then it's Europeans who are the first to encounter any bugs I may have introduced into the code, because they start the day earlier than I do.

The bug here is preventing the Rook's legal moves from being displayed, but it does not seem to be preventing you from manually typing in the move and making it. I will now look into this and try to fix it.


🕸📝Fergus Duniho wrote on Mon, Oct 4, 2021 01:32 PM UTC in reply to Aurelian Florea from 09:28 AM:

This is now fixed. In one line of the rays operator, I was using !empty() instead of isset(), and that's what introduced the bug that affected the operation of rays from some spaces.


About Game Courier. Web-based system for playing many different variants by email or in real-time.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Mon, Oct 4, 2021 08:41 PM UTC in reply to Jean-Louis Cazaux from 07:12 PM:

There was a syntax error in one line. It's now corrected.


Game Courier Settings Files. Keep track of all the settings files you have written for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Tue, Oct 5, 2021 01:19 AM UTC in reply to A. M. DeWitt from Mon Oct 4 08:53 PM:

Okay, I deleted them and the database entries for them too.


MPsuzumu-shogi[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Tue, Oct 5, 2021 02:23 AM UTC in reply to Daniel Zacharias from Mon Oct 4 09:06 PM:

The problem was that the board was too large to rotate 180 degrees. When I switched the shape from Grid to Square, it worked. To make it work for the provided background images, I replaced imagerotate() with imageflip(), which could get the same effect as rotating by 180 degrees by simply mirroring the image across both dimensions. Because this used fewer resources, it could handle the images provided for this game.


Changes to PHP Code[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Tue, Oct 5, 2021 08:58 PM UTC:

Since I can now work on code on the development server, I took the time to remove the remaining code for creating offline pages. While David used to make offline versions of the website, I have never done that. For one thing, I wasn't familiar with how he went about it. But I also didn't see the use for it. Things have changed since David wrote the code for this. Back when we got on the internet with 2400 baud modems that used the phone line, it would have been convenient to have an offline version of the site. But now that broadband and WIFI-enabled mobile devices are both common, it is easy enough to connect directly to the website. When the site is down, as it was recently, archived copies of pages can be found at archive.org. So, an offline copy is not needed for archival purposes. Additionally, the website has grown more interactive than it used to be. While it was originally a set of static HTML pages, it now includes comments, database-generated pages that may be revised on the website, and ongoing games. Finally, when I program code, I write it simply for a website, and I do not want to have to take care to build in support for generating offline pages.

Besides code that was run with the condition $foroffline or $offlineindex, I replaced every instance of echoandwrite with echo, and I removed the function definitions for echoandwrite and echoorwrite. The latter wasn't even being used anyway.

Removing some of the $foroffline code created a bug, and this happened to draw my attention to the icons that appear to the left of links. I had thought of these as slightly informative decoration, but they included links to information pages and included a bunch of ALT text telling some things about the item linked. I got rid of the links to the information pages, changed the ALT text to TITLE text, and reduced the provided information to just telling what the icon meant. With this done, I was able to remove the remaining $foroffline code in make_author_line, and I also removed the $foralttext option from it. There was really no need to include author information in the ALT text for the icon when it was already on the screen anyway. Removing the little-used links to info pages and reducing the information provided by what is now a tooltip should reduce page size and make index pages quicker to load. With that in mind, I may look into extending how many links may appear on an index page.


🕸Fergus Duniho wrote on Wed, Oct 6, 2021 01:42 AM UTC in reply to Ben Reiniger from Tue Oct 5 09:59 PM:

I did occasionally use the "info" page, previously linked to from the icon of an index entry. But I do not consider this worth keeping either. Those pages can still be reached from the "info" link in the footer of the item's actual page (except perhaps for multi-item pages?).

That's why I figured it would be okay to get rid of the link from the icon. The link in the footer had been the only link to the info page I had been aware of, and I figured it would be enough for anyone who wants to go to that page. I think most people would be unaware that the icon links to an info page or would just be interested in the link to the actual page rather than the link to a page with metadata about it. The index page really gave no indication that the icons linked to something different than the actual page, and most people who clicked on an icon would probably be surprised that it didn't go to the actual page.


Chess Variants Query. More options for searching in these pages.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Wed, Oct 6, 2021 01:45 AM UTC in reply to Ben Reiniger from Tue Oct 5 10:08 PM:

I have been working on replacing absolute URLs with relative URLs. But I had mainly been looking for chessvariants.com URLs. I guess I'll have to look for chessvariants.org URLs too.


Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Wed, Oct 6, 2021 01:55 AM UTC in reply to A. M. DeWitt from 01:30 AM:

I noticed that in one of your games yesterday, and when you mentioned it, I thought perhaps it was because there were no adjustments for your boards in the image_dimensions.php script. But I just tested Shogi and Xiangqi, and I am seeing the same thing. As I've been editing code to not show warnings in the PHP error log, I have made lots of edits to draw_grid_png.php. I'll have to take a look at it and see what's causing this.


Changes to PHP Code[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Wed, Oct 6, 2021 02:06 AM UTC:

One more reason for no longer supporting offline pages is that many pages now include script-generated images with the drawdiagram.php script. These will work on a website running PHP, but they will not work offline. If I wanted offline pages to support them, I would have to write a script that finds each link to a script-generated image, creates a copy of the image with a unique name, and replaces the link to the script-generated image with a link to the copy of its output. That's too much work for something no one probably needs anyway, and archive.org can already make copies of them.


Gods on Pluto ZIP file. Plays with extremely weak pieces, no pawns, and drops.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Wed, Oct 6, 2021 01:28 PM UTC in reply to Christine Bagley-Jones from 12:19 PM:

The problem is that there is no file to download. As the author of this page, it is up to you to fix this. Please upload it with the file manager in the same way you have uploaded images. There is a link to the file manager in the Edit menu.


Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Wed, Oct 6, 2021 04:52 PM UTC in reply to A. M. DeWitt from 02:17 PM:

Is there a way to detect suicide moves in GAME code?

There are two ways of doing a suicide, and these have different effects on the $old variable. Adding an @ to a space works like a promotion, which leaves the value of $old unaffected. Moving a piece nowhere gives $old an empty value. This may give a better indication that the move included a suicide, but it would come at the expense of the information about where the piece moved to.

Since it sounds like your Fire Demon piece is making a multi-part move, you may want to break down the whole move and analyze it step-by-step. You will find examples of this in multi-move variants like Marseillais Chess and Extra Move Chess.

With that in mind, another option would be to move the Fire Demon to the piece's space, then immediately move it back.

Another possibility for detecting a suicide move is to store the board position before the move into a variable, then compare the new position after the move to the stored position and see what differences there are.


Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Wed, Oct 6, 2021 05:44 PM UTC in reply to Fergus Duniho from 01:55 AM:

As I've been editing code to not show warnings in the PHP error log, I have made lots of edits to draw_grid_png.php. I'll have to take a look at it and see what's causing this.

It does not appear to be caused by any recent edits to draw_grid_png.php. I temporarily reverted to an earlier version, and the problem remained.


🕸💡📝Fergus Duniho wrote on Thu, Oct 7, 2021 02:16 AM UTC:

So far, I can't tell what the problem is. It affects both Square and Grid boards. I have been testing Chess, and the numbers look right when I examine the generated source code. Each square is 50x50, and after file a, each empty image for displaying a legal move has a left position that is 50 pixels greater than that for the file to its left. The a file starts at 16 pixels left, and each empty image for an empty space on that file starts at 23 pixels left. The h file starts at 366, and each empty image for an empty space on that file starts at 373. In each case, the difference is 7. Also, 373-23 and 366-16 are both 350, which is the expected value when each square is 50x50. With all these values being correct and equivalent, it remains a mystery why the empty image shifts slightly to the right with each file from left to right.


🕸💡📝Fergus Duniho wrote on Thu, Oct 7, 2021 05:23 PM UTC:

While the right-shifting was more readily apparent, I also checked for vertical shifting by creating a position where a Rook covered a whole file. What I found is that there is also downward-shifting. No matter whether the board is rotated for Black, the empty gifs in the lower right are closer to the lower right corner than empty gifs in spaces more to the left or top. This is consistent with right and down being the two directions that increase as the x or y position of the image increases, since 0,0 is in the top left corner.


🕸💡📝Fergus Duniho wrote on Thu, Oct 7, 2021 05:52 PM UTC:

Checking a screenshot of a Rook's legal moves in Chess in a graphics program, the squares for legal moves were at the right pixel locations, but the board was smaller than it should be. The image was 427x431. For comparison, I loaded the image by itself, took another screenshot, and checked its size. This time, it was 436x440. So, the browser is shrinking the image to fit the space, and after the browser has shrunk it, the precalculated positions for the empty images do not align with it. Therefore, I have to prevent the browser from shrinking the image.


🕸💡📝Fergus Duniho wrote on Thu, Oct 7, 2021 06:05 PM UTC:

I added max-length: 100% !important to the STYLE field for the board image, and this fixed the problem. The squares for highlighting pieces and legal moves now align correctly.


🕸💡📝Fergus Duniho wrote on Thu, Oct 7, 2021 09:12 PM UTC in reply to A. M. DeWitt from 06:49 PM:

Pieces are normally centered, but if you have odd-sized pieces on an even-sized space, or vice versa, 100% alignment may not be possible. Also, centering works best for pieces with nothing beyond the image of the piece itself. Some piece sets, such as Alfaerie, make all piece images a fixed size by adding extra space around most images. If the image of the piece is not properly centered in an image with extra space on the sides, it will not look properly centered on the board.


🕸💡📝Fergus Duniho wrote on Sat, Oct 9, 2021 02:13 AM UTC in reply to A. M. DeWitt from Fri Oct 8 01:01 AM:

What I meant to say was the the highlights for empty squares are slightly off center.

I've been working on that today, and I just copied over the changes I made. The highlight area is now larger. It had been small to fit on hexagonal spaces. Instead of using the same CSS for square and hexagonal spaces, I made the highlight area for hexagonal spaces round and increased its size. I'll see if anything more needs to be done tomorrow.


🕸💡📝Fergus Duniho wrote on Sun, Oct 10, 2021 02:15 AM UTC:

I've been working on this more today. Thanks to having a development server, I've been able to make extensive changes without regularly introducing bugs into the scripts people were using to play games. I realized that I could use margins to position the highlighting, and I moved as much of the CSS as I could from each IMG's STYLE element to some STYLE tags. This reduced the HTML code and the filesize of the page. I also added some code that is more adaptive to grids with unusual geometries, though I didn't test it on anything more unusual than Shogi. I made the highlighting of the last move made always the same color as the other highlighting, and I increased the border size for the piece that last moved to 5px, which fits the space better. As mentioned before, I'm now using circular borders to highlight hexagonal spaces. I slightly reduced the size of borders highlighting empty spaces from the size I made them yesterday, because it looks better that way, though I kept them larger than they used to be.


Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sun, Oct 10, 2021 11:15 PM UTC in reply to A. M. DeWitt from Sat Oct 9 01:23 AM:

Another possibility for detecting a suicide move is to store the board position before the move into a variable, then compare the new position after the move to the stored position and see what differences there are.

This could potentially solve the problems of detecting a suicide move if I knew how to do it.

Here's a preset I made to demonstrate how to do this:

https://www.chessvariants.com/play/pbm/play.php?game%3DChess%26settings%3Dspotcaptures

This records the position of every piece on the board in an array whose keys are coordinates and whose values are piece labels. It does this both before and after a move. It then goes through the current positions of pieces. For each empty space, represented with the @ piece, it compares it with the previous value to see if it was empty before. If it wasn't empty before, it records it as a capture.

Since I am already writing this, would the system used for the multi-move variants be able to handle moves with three or more parts (i.e. that of the Lion Dog in Maka Dai Dai Shogi)?

You could adapt it. For the multi-move variants, there are usually the same number of move parts each turn. So, it makes sense for these games to do the multi-part analysis globally for all pieces. But for games that include pieces with multi-part moves, you may want to reserve the multi-part analysis for specific pieces and tailor it to each piece that needs it.


🕸📝Fergus Duniho wrote on Mon, Oct 11, 2021 06:48 PM UTC:

I realized the role that $width and $height play in centering the borders for highlighting spaces, and with that in mind, I simplified the code in draw_grid_png.php and made adjustments to the $width and $height of Shogi pieces and to the values of $offx and $offy in image_dimensions.php. By using proper values for $width and $height, the code will always apply CSS for margins and padding to the space class rather than to each element of the space class.

I didn't immediately recognize the importance of $width and $height, because I created these variables years before I ever added the ability to display legal moves by highlighting spaces. These variables describe the width and height of spaces, and they are used when automatically generating a board to know what dimensions to give to spaces. But sometimes an image of a board is used instead, and when it is used, $width and $height should match the size of the spaces on the image.

This is what I was neglecting to do. The highlighting in Shogi was a bit off, because the value of $height did not match the height of the spaces on the images of Shogi boards.

Since Shogi divides each space by lines, there are two choices on how to specify the dimensions of a space. One is to use the inner space between the lines, and the other is to extend the size to include the lines. I tried both and chose the latter for Shogi.

For automatically-generated boards, the centering of borders for highlighting should now be done automatically. But for boards provided as pre-drawn images, it's important to match them up with the correct values for $width and $height. One way would be to size the board with spaces the same size as the dimensions given for the piece sets to be used with it. Abstract and Alfaerie sets both normally use 50x50 spaces. Another way would be to provide correct values for your board. I could add these to the image_dimensions.php script for specific boards.


🕸📝Fergus Duniho wrote on Thu, Oct 14, 2021 12:22 PM UTC in reply to A. M. DeWitt from 04:06 AM:

If something similar could be used to detect the type of piece affected by the suicide, that should be everything I need to enforce the burning rules using suicides, at least in theory.

That information is in #pfore. Just use the coordinates of the spaces with missing pieces as keys to this array.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sat, Oct 16, 2021 12:55 AM UTC in reply to A. M. DeWitt from Fri Oct 15 10:43 PM:

The Edit Comment scripts aren't working properly. Whenever I try to edit a comment it fails. Posting comments still works though.

Until I'm feeling better, I have simply reverted this to Sunday's version. I have been having fever symptoms. I had chills last night, and now I'm feeling too warm. I will continue debugging code when I'm feeling better.


Zillions of Games. It can play an endless variety of abstract board games, and we have a large collection of Chess variants you can play on it.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sun, Oct 17, 2021 01:49 AM UTC in reply to Robert Mate from Sat Oct 16 10:08 AM:

Guess I could try emulating windows 95

I don't think that will help. I think you just need to coordinate with another person who is willing to play against you at a certain time.


About Game Courier. Web-based system for playing many different variants by email or in real-time.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Wed, Oct 20, 2021 01:55 AM UTC in reply to A. M. DeWitt from Tue Oct 19 09:18 PM:

Is it just me, or is the latest version of my Taishin Shogi GC preset overloading this whole site? Whenever I click on my settings file to play it, I get nothing but 524 errors for a while.

When I first tried loading it, I checked the error log and got

PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/chessvariants/public_html/play/pbm/gamecode.php on line 2524

I fixed some of the errors above it, but I still get a maximum execution time exceeded error. There is one persisting and multiply-repeating warning that I think is due to your own code:

PHP Warning: Undefined array key 897 in /home/chessvariants/public_html/play/pbm/gamecode.php on line 1122

The line in question, line 1122, is part of the code for the "sub" command, which indicates the beginning of a subroutine definition, and it says:

$linenum = $links[$linenum];

This refers to an array that is calculated before any line of GAME Code is executed. This comes from analyzing the structure of the code. So, I would recommend looking for a structural problem in one of your subroutines. Perhaps a block of code wasn't closed off properly, causing endsub to not be expected yet when it appeared. The problem might be around line 897 of your code, since that was the value for $linenum in the warning that kept repeating.


Vao. moves like bishop but must jump when taking.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Thu, Oct 21, 2021 02:33 AM UTC in reply to dead dead from Wed Oct 20 11:25 PM:

Originally posted on Pemba, where this piece is called a Crocodile.

Calling the diagonal Cannon a “Crocodile” makes zero sense. I prefer Gilman’s term for the piece: Arrow.

Agreed, except that I introduced the name of Arrow in Yang Qi, and Gilman copied it. See Comment 14476 on the Yang Qi page.


🕸Fergus Duniho wrote on Thu, Oct 21, 2021 05:43 PM UTC in reply to Jean-Louis Cazaux from 09:41 AM:

Originally posted on Pemba, where this piece is called a Crocodile.

this is my variant. I name the pieces as I like. Plenty of other chessvariants have names for their pieces that I don't like. I beg you to respect my choice

Agreed. I respect the right of game creators to use the piece names they wish to.

I use the name of Crocodile for the Vao for several of my variants already published here and on my site. So, I wish to be consistent in the tree of my variants. See Zanzibar-S, Zanzibar-L, Maasai Chess, Teramachy, Gigachess II, Terachess II, etc.

While consistency makes sense, it is only consistency with yourself, and you retain the right to rename the piece in all your variants if you desire to.

Saying it has no sense is wrong and upsetting.

It would be wrong to say that you had no reason for the name, because of course you did. I can't speak for Theresa, but I was aware, more or less, of your reason for the name Crocodile. I just don't think it is a good one.

In Grant Acedrex (from 1283) there is a Crocodile, named Cocatrice to be precise in medieval Spanish but which is depicted as a crocodile in that codex. This piece plays as a modern Bishop. The diagonal move is the inspiration for the name of Crocodile in my variants. You can estimate that this reason is weak but it is not "no sense".

Okay, it is weak, and I will now back that up. First of all, I disagree with the principal that it is a good idea to intentionally name a piece after a different piece that moves similarly to it. To be clear, this is different than accidentally giving a piece the same name as another piece or intentionally giving a piece the same name as another piece despite that name already being in use. I consider a name already being used for another piece a prima facie reason against using the name. But as long as you have other good reasons for using a name, these reasons may override this reason against using the name and independently justify the use of the name. In this case, though, you have no independent reasons for using the name Crocodile. Your only reason is that the name was used for the Bishop, which moves in the same directions as the Vao. Since I would count this as a reason against using the name rather than as a reason for using it, I do not consider this a good reason for using the name.

Second, you are using a translation of the original name, and I do not trust your translation. Cocatrice (or cocatriz as I actually found it spelled in the text of the Grant Acedrex) is not the Spanish word for crocodile, which is actually cocodrilo. Both spellings, cocatrice and cocatriz, are suspiciously close to cockatrice, which is a mythical serpentine beast or dragon with two legs and the head of a rooster, and when I search for either term, that is what I get articles on. Although you claim that the Grant Acedrex depicts the cocatrice as a crocodile, I did not find any depiction of it in the images we have of it on this site. But if you have images we don't have, I would be happy to see them. Additionally, the Grant Acedrex has included the names of other mythical animals that you have translated into the names of real animals, such as AAnca and Vnicornio. I am suspicious of those translations as well. Naming pieces after mythical animals has not been uncommon. So, if a name in a historic text looks like the name of a mythical animal, that may well be what it is.

Finally, I did have very good reasons for selecting the name Arrow. My first idea for a name was the punny name of Canon, which is a kind of cleric whose name sounds like Cannon. But it's not really a good name for the piece in a game that already includes a Cannon, and I also decided to give it a Chinese name. For that, I chose the character , whose meanings include both arrow and vow. The idea of an arrow fits with the idea of a cannon as a long-range projectile weapon that can go over the heads of others, and vow is a homonym for Vao, the name that the piece goes by in fairy chess.


🕸Fergus Duniho wrote on Fri, Oct 22, 2021 01:21 PM UTC in reply to Jean-Louis Cazaux from Thu Oct 21 07:32 PM:

Originally posted on Pemba, where this piece is called a Crocodile.

The depiction I was talking about, and S.Musser is talking about, is the unique illustration that is known of this game, the one on the codex

Link, please. I already hunted for a picture yesterday and came up with nothing. Your website included a link to another site, but that site was down, and archive.org wasn't very helpful.


🕸Fergus Duniho wrote on Fri, Oct 22, 2021 06:02 PM UTC in reply to Bn Em from 02:08 PM:

I have moved this discussion to the Vao page.

I assume JL means this one?

Okay, I missed that, because I was looking for an illustration of the piece itself and didn't realize he meant the illustration of the board. The piece in the Bishops's position has four legs and the general shape of a crocodile. So, crocodile may be a fair translation. But my other point still stands. Since the piece that could be translated as crocodile was a Bishop and not a Vao, it doesn't set any precedent or provide a good enough reason for using that name for the Vao.


Rollerball. Chess race fight on board formed by removing 3 by 3 square from center of 7 by 7 square. (7x7, Cells: 40) [All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Sat, Oct 23, 2021 08:10 PM UTC in reply to Jean-Louis Cazaux from 07:07 PM:

Fixed.


Grand Apothecary Chess-Classic. Very large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Tue, Oct 26, 2021 03:20 PM UTC in reply to Aurelian Florea from 07:35 AM:

The board is colored in 4 colors because of the fact that the nightrider is easier to visualize this way.

But why not three colors instead of four? When I created Cavalier Chess, I tried a four color board, but I found that three colors works better.


New Submissions for Review. A listing of all submissions still awaiting editorial approval.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Fri, Oct 29, 2021 03:01 PM UTC in reply to A. M. DeWitt from 02:07 AM:

Okay.


Janggi - 장기 - Korean Chess. The variant of chess played in Korea. (9x10, Cells: 90) (Recognized!)[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sun, Oct 31, 2021 09:06 PM UTC in reply to Jeyoon Jung from 08:59 AM:

One more thing. I am a relatively new person to the CVP, and I believe I saw some articles detailing some strategies in oriental games. However, I cannot find an option to do that.

To do what?


Simple Mideast Chess. Members-Only Game with simple rules, no promotion, no nonstandard move or capture, no asymetric pieces, and no check, checkmate or stalemate.[All Comments] [Add Comment or Rating]

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Tue, Nov 23, 2021 02:10 AM UTC in reply to Aurelian Florea from Mon Nov 22 06:50 AM:

Fergus, Are you here?

Yes, I've been slacking. I'm also trying to catch up on my reading, as I am still ten books away from my reading goal of 52 books for the year, and I have less than six weeks to complete it.


🕸📝Fergus Duniho wrote on Tue, Nov 23, 2021 10:00 PM UTC in reply to Aurelian Florea from 06:50 AM:

These are all using code from H. G. Muller's code generator. So, he would be the one to ask about this unless the problem is more universal.


🕸📝Fergus Duniho wrote on Wed, Nov 24, 2021 02:05 AM UTC in reply to H. G. Muller from Tue Nov 23 10:37 PM:

Doesn't the fact that the code work perfectly in Play mode prove that the problem is not in this code, then?

No, it doesn't. There are sometimes differences in how a game works in Solitaire or Play mode and how it works between two players.


🕸📝Fergus Duniho wrote on Wed, Nov 24, 2021 02:07 AM UTC in reply to Daniel Zacharias from 01:26 AM:

The games all say "White lost by absence of royalty!" and the board is filled with the same piece every time, which seems to always be whatever piece is labelled 's'

Since that error message is not from the PHP code, it must be from the GAME Code.


🕸📝Fergus Duniho wrote on Wed, Nov 24, 2021 05:32 PM UTC in reply to H. G. Muller from 07:34 AM:

It looks like you are not retrieving the value of the constant properly. The line

setsystem space startshuffle;

should be either

setsystem space const startshuffle;

or

setsystem space @startshuffle;

Game Courier Settings Files. Keep track of all the settings files you have written for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Wed, Nov 24, 2021 05:38 PM UTC in reply to A. M. DeWitt from 05:02 PM:

Okay, those are deleted.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Wed, Nov 24, 2021 10:08 PM UTC in reply to H. G. Muller from 06:53 PM:

Pretty amazing that this did not appear to cause any problems in Play mode.

I ran a simple test in Solitaire mode, and it kept running the code for when the constant is not already set. I'll now look into why that is.


🕸📝Fergus Duniho wrote on Thu, Dec 2, 2021 01:40 AM UTC in reply to Aurelian Florea from Tue Nov 30 05:38 AM:

I have been busy with other things. What is the specific issue you are having, and how can I duplicate it?


🕸📝Fergus Duniho wrote on Sat, Feb 5, 2022 07:57 PM UTC in reply to Aurelian Florea from Thu Dec 2 2021 07:10 AM:

In the following preset:

https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+1&settings=Applet

the pictures are not shown properly.when playing in online mode. In the local play mode things are fine.

In my testing, images show up fine on White's turn but not on Black's. On Black's turn, the pieces for I, U, and Y do not show up. In the HTML, no piece file is provided for these pieces. It also gets some pieces wrong. It shows a Zebra for the Cannon, a Camel for the Jester, a Gold General for the Kangaroo, an Amazon for the Bird, and a Marshall for the Tank. Another thing happening on Black's turn is that it displays the entire Alfaerie:Many piece set at the bottom of the page. But when it is White's turn, it does not. So, I'm thinking that $pieces is being set to #mypieces only on White's turn and not on Black's.


🕸📝Fergus Duniho wrote on Sat, Feb 5, 2022 08:14 PM UTC in reply to Fergus Duniho from 07:57 PM:

When I tested the value of $pieces at the very end of the code, it matched the value for #mypieces on Black's turn. So, the problem might not be in the GAME Code but in the PHP that operates after the GAME Code is run.


🕸📝Fergus Duniho wrote on Sat, Feb 5, 2022 11:24 PM UTC in reply to Daniel Zacharias from 10:09 PM:

Isn't that because $flipped needs to be set for black?

Yes, adding this line fixed it:

setsystem flipped var mypieces;

The reason this was necessary is because this preset used the Alfaerie:Many set, which does include some flipped pieces even though most of the set is not flipped.


Ads in French[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Sat, Feb 5, 2022 11:54 PM UTC in reply to Jean-Louis Cazaux from Tue Jan 25 12:06 PM:

Being based in France, I see ads from e-bay in French. But many are not related to chess. The reason is that "chess" is "échecs" in French, always at plural, with an "s" at the end. The word in singular, "échec" means "failure" in English. (It also means "check" which may complicate).

So, there several ads for books dealing with the failure of something, failure of education, failure of economy, whatever, but no relation at all with chess.

The search term has in fact been "echecs", but since you pointed it out, I did see some books in the preview for the books ad that used the world echec, such as L'ECHEC DE L'ISLAM. To fix this, I changed the search terms to "echecs -echec", and only books with "echecs" in the title showed up.


Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Sun, Feb 6, 2022 12:16 AM UTC in reply to A. M. DeWitt from Sat Dec 11 2021 09:40 PM:

The problem occurs when I make a triple move with a piece with Lion Dog powers where all three parts move the piece to different squares and the third square is empty. The preset will exit with an error message stating that the promotion is illegal when it should be legal.

After a triple move, you would need a fourth move for the promotion, but your allow statement does not include any allowances for fourth moves.


History of the Chess Variant pages. Missing description[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Sun, Feb 6, 2022 12:21 AM UTC in reply to Jean-Louis Cazaux from Thu Dec 9 2021 10:31 PM:

I have the feeling that this page is not the latest version.

You may have this page confused with The History of Chess Variants, which is an independent page, unrelated to this one.


What is a Chess variant?. An essay on what distinguishes a Chess variant from other games.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sun, Feb 6, 2022 12:25 AM UTC in reply to Jean-Louis Cazaux from Thu Dec 9 2021 05:36 PM:

Is "heterdox" an English word valid in this context or just a typo here?

It's a typo. I've now made corrections.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sun, Feb 6, 2022 02:39 PM UTC in reply to Aurelian Florea from 08:35 AM:

I introduced a general problem last night regarding the parsing of $_POST values, and I have now fixed it.


🕸📝Fergus Duniho wrote on Sun, Feb 6, 2022 05:10 PM UTC in reply to Aurelian Florea from 03:12 PM:

It will be easier to look into this if you first fix the display of pieces on Black's turn. You need to set $flipped to the same value as $pieces, because Alfaerie:Many includes some flipped pieces, but your game does not.


🕸📝Fergus Duniho wrote on Sun, Feb 6, 2022 05:30 PM UTC in reply to Aurelian Florea from 03:12 PM:

These 3 presets work fine but the shuffling algorithm produces different initial setups for white and black.

I'm testing with this clone:

https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+1&settings=Applet-Test

I see that Black and White have different opening positions. Is that what you mean?

If you want them to be the same, then you need to create a random opening position for only one side and copy it to the other side. This might be an issue for H. G. to deal with, as the buggy code might be his.


A Wizard for GAME-Code Generation. A tutorial on using the Play-Test Applet for automating Game Courier presets.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Sun, Feb 6, 2022 06:27 PM UTC in reply to Daniel Zacharias from Fri Jan 14 11:58 PM:

I'm having some problems with this game. First, I can't seem to get the piece images to show correctly. Right now it looks ok at first, but when viewing a game from black's perspective it's all wrong again.

Because you're using the Alfaerie:Many set, which includes some flipped pieces, you need to include a value for $flipped. Since you are not using any flipped pieces in your game, you should set it to the same value as you are setting $pieces to.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sun, Feb 6, 2022 06:31 PM UTC in reply to H. G. Muller from 06:12 PM:

@Fergus: please also have a look at the problem reported here.

Do you mean the problem reported by Daniel Zacharias, which I just gave the solution to? Or were you describing an independent problem? If so, I would need a link.


🕸📝Fergus Duniho wrote on Sun, Feb 6, 2022 07:14 PM UTC in reply to Daniel Zacharias from 06:53 PM:

What was that problem, specifically? What doesn't work?


🕸📝Fergus Duniho wrote on Sun, Feb 6, 2022 08:53 PM UTC in reply to Daniel Zacharias from 07:35 PM:

When I entered that sequence of moves all at once, I got the same error. Then I entered each move separately and still got the same error. So, I took back the last move and found another legal move, which worked out. A little later, I tested other moves by the E and e pieces, and when I moved the other E piece, though not an e piece, I got the same error. Taking back that move and trying E again later, I got the error "g4 is empty". There seems to be something wrong with the E piece, but I am too unfamiliar with the workings of this generated code to debug it.


🕸📝Fergus Duniho wrote on Sun, Feb 6, 2022 09:41 PM UTC in reply to H. G. Muller from 09:12 PM:

In a short game in which I was moving Pawns out of the way to move the E piece, I tried each E piece, and it gave the error "g4 is empty" each time. Since g4 was in fact empty, I did a quicker game in which I just moved Pawns near the E and e piece before moving the E piece. This gave the error:

ILLEGAL: P i4-i5 on turn 1:

There was no P on i4. The piece on i4 is a E.

Go back with your browser's BACK button, reload the page, and try again.

For diagnostic purposes, here is the full movelist:

1. P i4-i5 
1... p i9-i8 
2. E j3-i4

I then took back the last move, cleared a space for the other E piece to move, moved an e piece, then moved the other E piece. This time, I got the error "i4 is empty".

So, it's looking like there is something wrong with the E piece.


🕸📝Fergus Duniho wrote on Sun, Feb 6, 2022 10:23 PM UTC in reply to H. G. Muller from 10:01 PM:

It sounds like something in your code is producing an unwanted goto to the beginning of the program when the E piece is moved.

This bit of code in the pregame section might be the problem:

        case I E 
          set choice intersection #choice (O #piece);
          break;

Notice that there is no colon after the E in the case statement.


History of the Chess Variant pages. Missing description[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Sun, Feb 6, 2022 10:49 PM UTC in reply to Jean-Louis Cazaux from 10:35 PM:

There is the more recent page Who is behind the Chess Variant Pages?.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Mon, Feb 7, 2022 02:15 PM UTC in reply to Aurelian Florea from 01:38 PM:

Are these the correct instructions at the end of the presets?

setsystem pieces #mypieces; setsystem flipped #mypieces;

Since the first one worked, the second should too. I think using var instead of the # prefix would be a bit quicker for an array, but it is probably negligible.


Game Courier History. History of the Chess Variants Game Courier PBM system.[All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Mon, Feb 7, 2022 06:18 PM UTC:

I made a correction to the handling of case statements. If multiple case labels were in the same case statement, it would previously check only if the first one was already assigned. It will now check whether every single case label has been assigned. If a case label has already been assigned in a switch, it will give an error message.

If a case label includes whitespace, it will now report an error message. This is in case a colon is left off a case statement, and a new line character gets included in the case label.

If a switch statement is passed a value that does not match any of its cases, and it has no default case, it will report an error message that neither the expected case nor a default case exist.

The print statement can now be used to print the value of an array, which will make it more useful for debugging.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Mon, Feb 7, 2022 06:21 PM UTC in reply to H. G. Muller from 11:31 AM:

Isn't it possible to do some syntax checking on the GAME code (e.g. when it gets submitted) to prevent such erratic behavior?

I have added some error messages to make it easier to spot this kind of error in the future. See comment 43913 on the Game Courier History page.


90 comments displayed

EarliestEarlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.