summaryrefslogtreecommitdiff
path: root/chess-ics.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-05-01 21:47:30 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-05-01 21:47:30 +0000
commitecb9d2a2fcd5befd74f13d072a074f7be83416c8 (patch)
tree5ff07f045c6f9f70464a68f98fff9e298709d9e0 /chess-ics.el
parent5fe6d2494af536928464df13f58ef8d7a72a354e (diff)
*** no comment ***
Diffstat (limited to 'chess-ics.el')
-rw-r--r--chess-ics.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/chess-ics.el b/chess-ics.el
index 5b90b19..dca9088 100644
--- a/chess-ics.el
+++ b/chess-ics.el
@@ -353,6 +353,21 @@ who is black."
nil (format "match %s\n"
(read-string (chess-string 'challenge-whom)))))
+ ((eq event 'move)
+ (when (= 1 (chess-game-index game))
+ (chess-game-set-tag game "White" chess-full-name)
+ (chess-game-set-tag game "Black" chess-engine-opponent-name))
+
+ (cond
+ ((chess-ply-keyword (car args) :resign)
+ (chess-engine-send nil "resign\n"))
+ (t
+ (chess-engine-send nil (concat (chess-ply-to-algebraic (car args) t)
+ "\n"))))
+
+ (if (chess-game-over-p game)
+ (chess-game-set-data game 'active nil)))
+
((eq event 'send)
(comint-send-string (get-buffer-process (current-buffer))
(car args)))