The Chess Variant Pages
Custom Search




[ 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

This item is a play-by-email page
It belongs to categories: Orthodox chess, 
It was last modified on: 2016-12-11
 Author: Fergus  Duniho. Chess. Play Chess online with other people, using Game Courier, a PBM system that works with any web browser on any computer.[All Comments] [Add Comment or Rating]
Fergus Duniho wrote on 2020-02-07 UTC

The presets on this page now use newly designed fairychess code instead of Chess3, though existing games will not be affected by this. The fairychess include file is designed to be easily adapted for other games. Unlike Chess3, it identifies pieces by name instead of label, and it uses constants to associate labels with piece names. It also contains many more piece definitions, and I'll add more as need for them comes up. Just assign piece names to piece labels using constants. If you want to change the name of a piece, you can copy its functions (and subroutine if need be) to another name, then assign your constants to the new name. Here's an example of what could be done in Chinese Chess:

copyfn Chinese_Elephant Elephant;
copyfn Chinese_Elephant-Range Elephant-Range;
copyfn Chinese_Elephant Minister;
copyfn Chinese_Elephant-Range Minister-Range;
setconst e Elephant;
setconst E Minister;

Note that copying functions should be done after the file has been included, since it contains the functions to be copied. I'm not sure what to do about copying subroutines except to copy the whole code and change its name, but few pieces use subroutines.