From f3fb03223eb03e1a362dbae4c1b48f8e07a48c0e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 8 Apr 2002 03:51:55 +0000 Subject: Bug fixes. --- chess-pos.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chess-pos.el') diff --git a/chess-pos.el b/chess-pos.el index df3e511..c558531 100644 --- a/chess-pos.el +++ b/chess-pos.el @@ -356,6 +356,8 @@ indices which indicate where a piece may have moved from." (if (and (null candidates) (or (and (equal target (chess-rf-to-index rank 6)) + (= (chess-pos-piece position (chess-rf-to-index rank 4)) + (if color ?K ?k)) (chess-pos-can-castle position (if color ?K ?k)) (setq pos (chess-rf-to-index rank 5)) (chess-pos-piece-p position pos ? ) @@ -364,6 +366,8 @@ indices which indicate where a piece may have moved from." (chess-pos-piece-p position pos ? ) (not (chess-search-position position pos (not color)))) (and (equal target (chess-rf-to-index rank 2)) + (= (chess-pos-piece position (chess-rf-to-index rank 4)) + (if color ?K ?k)) (chess-pos-can-castle position (if color ?Q ?q)) (setq pos (chess-rf-to-index rank 1)) (chess-pos-piece-p position pos ? ) -- cgit v1.2.3