Check out Makruk (Thai Chess), our featured variant for March, 2025.


[ 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, Jan 1, 2021 02:52 PM EST in reply to Greg Strong from 01:37 PM:

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.