summaryrefslogtreecommitdiff
path: root/chess-ics.el
diff options
context:
space:
mode:
Diffstat (limited to 'chess-ics.el')
-rw-r--r--chess-ics.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/chess-ics.el b/chess-ics.el
index cffe278..a6226ec 100644
--- a/chess-ics.el
+++ b/chess-ics.el
@@ -111,11 +111,12 @@ who is black."
(end (match-end 1))
(info (chess-ics12-parse (match-string 2))))
(if (> (chess-game-index (chess-engine-game nil)) 0)
- (if (eq color (chess-pos-side-to-move (chess-engine-position nil)))
- (chess-engine-do-move (car ply-info)))
+ (if (eq (chess-pos-side-to-move (chess-ply-pos (car info)))
+ (chess-pos-side-to-move (chess-engine-position nil)))
+ (chess-engine-do-move (car info)))
(chess-game-set-plies (chess-engine-game nil)
- (list (car ply-info)))
- (unless (string= (cadr ply-info) ics-handle)
+ (list (car info)))
+ (unless (string= (cadr info) ics-handle)
(chess-game-run-hooks (chess-engine-game nil) 'pass)))
(delete-region begin end)))