[FIX] Chess Castling Fix

Rick McGeer rick at mcgeer.com
Sat Sep 18 08:14:09 UTC 2004


I added two new methods to ChessMoveGenerator and a bunch of constants 
to ChessConstants. Briefly, a bug in the chess game is that it will 
castle when either the king or rook is under attack, or any of the 
intermediate squares is under attack. This is, uh, against the rules. So 
I added a little code which checks efficiently to see if that's the 
case, and if it is castling is invalid. Tested and works, should be no 
problem to load.

Change Set:		Chess Castling Fix
Date:			19 September 2004
Author:			Rick McGeer

Thanks to Andreas Raab for much discussion of the problem, consulting and being patient with my silly bugs.






More information about the Squeak-dev mailing list