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 an unknown type!
It belongs to categories: Orthodox chess, 
It was last modified on: 2003-09-09
 Author: Fergus  Duniho. Game Courier Logs. View the logs of games played on Game Courier.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on 2020-08-07 UTC

Is there a GAME code command for setting the board to a given FEN code? I am currently looking into the issue of handling shuffle games. But because potentially every square on the board could be involved in a shuffle, it seems a good idea to store the entire board in a constant, like setconst startshuffle fencode; . The trick is to set up the board from the retreived constant, if that existed.

[Edit] Or would it be better to copy and restore the $space system variable, though

setconst startshuffle $space;
setsystem space const startshuffle;

?

[Edit2] Well, the latter seems to work, so I suppose I can stick to that. But something else: I tried shuffle #a; , where a is an array of coordinates. But that doesn't do anything. Apparently shuffle wants to have the list of coordinates it should shuffle as literals. I could not think of any better way than joining all array elements in a for-next loop into a space-separated text string, append that to the string "shuffle", and apply eval to it. Isn't there really any simpler way to do that?