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

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, Nov 1, 2009 03:03 AM UTC:

I have now modified the store and restore commands to use labels. For backwards compatibility, they can be used without labels. When used without a label, they use the default label of 'last'. When used with labels, you can use them to keep a running record of past positions. Before each move, for example, you could have a preset automatically make a new label based on the turn number and whose turn it is to move, then have players remember the convention used for labels to restore the position to what it was on a previous turn. Or you could write a subroutine that takes two arguments, such as turn and side to move, to generate the right label and use it with the restore command. Here's some sample code:

Pre-Game
set turn 1;
sub gobackto side turn:
  set label join #side #turn;
  restore #label;
endsub;
Pre-Move 1:
set label join White #turn;
store #label;
Pre-Move 2:
set label join Black #turn;
store #label;
inc turn;