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 code table-driven move generator[Subject Thread] [Add Response]
H. G. Muller wrote on Sun, Jul 26, 2020 08:44 PM UTC in reply to Fergus Duniho from 08:15 PM:

Ah, thanks! Is there a way to edit a preset without Game Courier first attempting to execute the code? It is really inconvenient if an accidental deletion could make the preset go in hiding this way...

I still don't understand how it could have happened in this case; the preset seemed to work fine until I stopped working on it. I wouldn't make any significant changes without immediately testing them. Perhaps something went wrong when I deleted a print statement I had used for debugging, and I accidentally deleted something else as well.

There is something else I don't understand either. I have two subroutines, HandleMove and ParseMove, each with formal parameter 'player'. I try to make one call the other:

sub HandleMove player:
  gosub ParseMove var player;
  eval join "MOVE: " thismove;
endsub;

But when I print 'player' in ParseMove (for debugging purposes) it prints 'var'!? Can the actual parameters of a subroutine call not be expressions like 'var player'?