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 Fri, Dec 31, 2010 03:41 AM UTC:

As an update to my last comment here, the new input and revision commands are called appendmove, ask, askpromote, continuemove, redomove, and rewritemove. They are all described in Input and Revision Commands. The continuemove command is what I earlier called extendmove. I have just made use of it with Extra Move Chess to handle double moves.

While working on that game, I discovered a good use for a do-while loop that ends with a never condition. I previously mentioned that this will function like a simple if statement. Although it doesn't have the benefit of adding elseif conditions, it can sometimes be more useful than a simple if statement, because it allows the use of break or continue to exit it early or the use of redo to return to the beginning. In Extra Move Chess, I had code that I wanted to execute if the player made a second move, but if the player passed the second move with the pass command, I wanted to skip over most of this code. So I put it in a do-while/loop-never loop and used break to exit early if the move equaled the pass command.