M Winther wrote on Fri, Dec 17, 2010 08:14 AM UTC:
Of course, 'extendmove' must be conditioned, but it seems like the flags don't change their value when 'extendmove' is used(?). Correct me if I'm wrong; if I change a flag in order to make extendmove conditional, the flag doesn't actually change its value until the other *colour* gets the turn.
Example:
if flag firstturn;
if == origin e1 and == dest g1:
setsystem moves 'swap e1 g1';
add K g1 N e1;
endif;
unsetflag firstturn;
setflag secondturn;
extendmove;
elseif flag secondturn;
if equal moved Q;
setsystem moves 'swap origin dest';
add moved origin moved dest;
endif;
unsetflag secondturn;
endif;
In the above code 'secondturn' is executed by the same colour. But this code is never executed because the flag 'secondturn' does not actually change its value until the other player gets the turn. The command extendmove seems to have this effect, if I'm correct.
/Mats