summaryrefslogtreecommitdiff
path: root/chess-ply.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-11 02:17:09 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-11 02:17:09 +0000
commit4bf636091a501c662213c8bc80242d2f65e97f09 (patch)
tree900f8f51fb5e6c11f0a1ae9b5f10474a94d78839 /chess-ply.el
parentd051395b562b54e77eab07bfab4899a327058a52 (diff)
*** no comment ***
Diffstat (limited to 'chess-ply.el')
-rw-r--r--chess-ply.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/chess-ply.el b/chess-ply.el
index e1a3af1..391264b 100644
--- a/chess-ply.el
+++ b/chess-ply.el
@@ -88,8 +88,8 @@
(defun chess-ply-create-castle (position &optional long)
"Create a castling ply; this function supports Fischer Random castling."
(let* ((color (chess-pos-side-to-move position))
- (king (chess-pos-search position (if color ?K ?k)))
- (king-target (chess-rf-to-index rank (if long 2 6)))
+ (king (car (chess-pos-search position (if color ?K ?k))))
+ (king-target (chess-rf-to-index (if color 7 0) (if long 2 6)))
(king-file (chess-index-file king))
(file (if long 0 7))
rook)
@@ -102,7 +102,7 @@
(chess-search-position position king-target (if color ?K ?k)))
(cons (chess-pos-copy position)
(list king king-target rook
- (chess-rf-to-index rank (if long 3 5))
+ (chess-rf-to-index (if color 7 0) (if long 3 5))
(if long :long-castle :castle))))))
(defun chess-ply-create (position &rest changes)