My bad, I wrote elsif: instead of elseif: somewhere. And I didn't test, as I figured that 'resign' would only work when you are actually playing a game. But it seems I can actually type 'resign' in Play mode. But this produces very strange behavior. I have this code in ParseMove now:
if != 2 count #sqrs: // must give 2 squares
print . count= count #sqrs;
print thismove;
if == resign thismove:
print ok;
resign;
elseif == drawn thismove:
drawn;
endif;
die "board step does not mention two squares";
endif;
When I enter 'resign' it prints 'count=1', 'resign' and 'ok' as expected. Then, however, it survives the 'die', and continues until it later dies with the complaint that 'resign' isn't even pseudo-legal for a Pawn.
[Edit] It seems resign doesn't have the new behavior in this context: it terminates execution of the current subroutine, but not of the GAME code. It happily continues with the caller.
My bad, I wrote elsif: instead of elseif: somewhere. And I didn't test, as I figured that 'resign' would only work when you are actually playing a game. But it seems I can actually type 'resign' in Play mode. But this produces very strange behavior. I have this code in ParseMove now:
When I enter 'resign' it prints 'count=1', 'resign' and 'ok' as expected. Then, however, it survives the 'die', and continues until it later dies with the complaint that 'resign' isn't even pseudo-legal for a Pawn.
[Edit] It seems resign doesn't have the new behavior in this context: it terminates execution of the current subroutine, but not of the GAME code. It happily continues with the caller.