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

Play-test applet for chess variants. Applet you can play your own variant against.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, May 3 04:55 AM EDT in reply to Aurelian Florea from Thu May 2 08:37 AM:

But some hints to where I put my code and what that code should be are very welcomed.

I think the variable 'mln' gives you the current move number in the Post-Move sections. What you want is special treatment for the first few ('prelude') moves, and then the normal procedure possibly followed by gating when this would be required. So something like:

if == mln 0:
  ... // do what has to be done for the first prelude turn
elsif == mln 2:
  ... // do what has to be done for the third prelude turn
else:
  gosub HandleMove true;
  set waiting where #ori 0 -1; // square behind moved piece
  if not flag #ori and == 1 rank #ori != @ space #waiting: // virgin first-rank piece with something behind it
    add space #waiting #ori; // gate the piece
    empty #waiting;
  endif;
endif;

You stil would have to suppress normal moves for the pieces waiting to be gated. I suppose the easiest way to do this define an alternative version of those that looks the same but does not have any moves, and put those on 0th rank. When its turn comes to be gated you then put the version with moves on the board.