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 ]

Single Comment

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 12, 2008 07:51 PM UTC:

I have finished programming some commands for restricting user input. I have rewritten the ban command to handle types of movement, I have introduced the allow command, and I have added a system variable for restricting the length of a full move. These changes do not affect any games that do not enforce rules. They are merely provided as options to help developers program better rule enforcement. Here is how they would generally be used together for Chess:

setsystem maxmove 2;
ban commands allmoves;
allow moves 1 captures 1 promotions 2;

I have added this code to the Chess include files, and I have added appropriate code to some of the other include files. So extraneous user input should now be banned in several games that enforce the rules. If you have programmed rule enforcement for your own presets that do not include any of my include files, then you will need to add this or similar code yourself.

If you program in GAME Code, you may want to take note of this. One internal change I made while programming these features was to separate user input from GAME Code commands. The result is that user notation can no longer be used inside of a GAME Code program as programming code unless the line is prepended with the keyword 'MOVE: '. In general, it is best to reserve user notation for the players and use only commands in the code you program.