summaryrefslogtreecommitdiff
path: root/chess-pos.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-08 03:51:55 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-08 03:51:55 +0000
commitf3fb03223eb03e1a362dbae4c1b48f8e07a48c0e (patch)
treea317019f1386ce1463db4eadb8d9de02c6d66854 /chess-pos.el
parentb60fd83dd950c2c5ef04f23f25bf0d25ac9c11db (diff)
Bug fixes.
Diffstat (limited to 'chess-pos.el')
-rw-r--r--chess-pos.el4
1 files changed, 4 insertions, 0 deletions
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 ? )