Check out Modern Chess, our featured variant for January, 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

Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sat, Jan 3, 2009 03:52 AM UTC:

Thanks for your bug reports, Thomas. Here is a checklist of what I have dealt with.

The operator sign calculates the sign of the operand decremented by 1.

Fixed.

In the preset for orthodox chess (and maybe in some others too) it is not
tested if a rook to castle with has been captured. One should add
  unsetflag dest;
at an appropriate place in the code.

Yes, it allowed the King to castle with a Queen that captured a Bishop that captured the Rook. I fixed it in the Chess preset. To avoid editing numerous presets, I may modify the - operator to unset flags and create a system variable for turning this behavior off for games that use flags differently.

In the file 'chess2.txt':

In function p: checkatwostep must have the arguments 0 -1 0 -1;

Fixed.

Functions p and P allow captures to occupied squares only (except
enpassant). Thus they are not suited to test if an empty square is
attacked, and the subroutine 'castle' doesn't work correctly. It calls
'checked' to test for castling out of or through check, which in turn
uses p and P.

TO DO. I'm not sure if I can fix the functions, since the stalemated subroutine uses them to check whether any piece may move. What I should do is rewrite the castle subroutine to move the King one space at a time, checking whether the King is in check for each step of its move. Then these functions should work with the castle subroutine.

In sub stalemated: If a royal pawn captures en-passant, the captured pawn
isn't removed.

I never anticipated royal Pawns. Since I don't know of any games with royal Pawns, and I don't think royal Pawns would make for a very good game, I have simply modified the comments to say that it doesn't work for royal Pawns.

 (also, 'store' and 'restore' are called more often than necessary.)

The stalemated subroutine calls store once. It might call restore in one spot where it's not needed, but it doesn't hurt. Every time restore is used after a move, it is necessary.

In sub 'enpassant': The line
  set #pe join filename #to filename #from;
should be replaced by
  local pe;
  set pe join filename #to rankname #from;

Fixed

In sub castle: near the end there should be 'subargs' instead of
'subarg'.

Fixed.