From 4bf636091a501c662213c8bc80242d2f65e97f09 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 11 Apr 2002 02:17:09 +0000 Subject: *** no comment *** --- chess-ply.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'chess-ply.el') 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) -- cgit v1.2.3