Chess Castling Fix

Summary: Fix to Chess to prevent Castling through check (that's illegal!). Also added some constants for readability.
Author: rick@mcgeer.com
Owner: Rick McGeer (rm)
Co-maintainers: <None>
Categories:
Homepage:
PackageInfo name: Chess Castling Fix
RSS feed:

Description:

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.

Releases


Back