in reply to Re: Perl Chess Server
in thread Perl Chess Server

the castling rule that is tricky is that a king can not castle when in check or if it passes over a square that would be in check.

Or if the king (or rook) has already moved...(even if they're now at their initial position.