M Winther wrote on Sun, Dec 19, 2010 08:48 AM UTC:
Fergus, I am having problems with the *ask* command. It seems to end up in an eternal loop. When I choose an alternative it merely asks again. I even use a constant to prevent eternal loops, but it doesn't help. (In the following code I use 'skip' for testing purposes):
[...]
elseif equal moved K;
set legal or checkleap origin dest 1 1 checkleap origin dest 1 0;
if var legal;
if and equal dest c1 equal #wcastletest 0;
unsetconst wcastletest;
setconst wcastletest 1;
if or and equal origin b1 and equal @ space d1 equal R space a1
and equal origin d1 and equal @ space b1 equal R space a1;
ask 'Do you want to castle long?' 'y' 'skip' 'n' 'skip';
endif;
endif;
else;
[...]
endif;
endif;
Nor can I get 'askpromote' to work. This generates an eternal loop:
if and var legal equal rankname dest 8;
askpromote Q R B N;
endif;
/Mats