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.
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:
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.