https://bugs.kde.org/show_bug.cgi?id=430403

Dave Kaye <d...@linuxmail.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |CONFIRMED
     Ever confirmed|0                           |1

--- Comment #3 from Dave Kaye <d...@linuxmail.org> ---
This is a bug in the castling code for Knights.  It is reproducible for both
king side and queen side castling.

The rules for castling are:
* king has not moved
* rook has not moved
* no pieces between the king and rook
* king is not in check
* king does not cross over a square that is attacked by the opponent's pieces
* king does not end the move on a square attacked by the opponent's pieces

All of these rules are passed in the attached game.  The unusual situation is
that the rook was captured - but the rook never "moved" so it passed the rules
tests.  A human would recognize the piece was not a rook and therefore not
castle.  An additional rule must be formulated specifically for a computer to
test if the piece is a rook.  It would reside in Knights castling routines.

Attached are game files that can be used to test the code.  The NEXT move in
the game will be the castling move, and will demonstrate the error.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to