From a0769011c2a98841156559aa37978156766cc09f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 10 Apr 2002 23:55:13 +0000 Subject: Added support for aborting a game. Use A or N from a display. --- chess-link.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'chess-link.el') diff --git a/chess-link.el b/chess-link.el index 47e58e8..a65a583 100644 --- a/chess-link.el +++ b/chess-link.el @@ -14,20 +14,25 @@ "This function handles responses from the bot's computing engine." (let* ((game (chess-engine-game nil)) (first-engine (chess-game-data game 'first-engine)) - (second-engine (chess-game-data game 'second-engine))) + (second-engine (chess-game-data game 'second-engine)) + return-value) (cond ((eq event 'connect) - (chess-engine-command nil 'accept)) + (chess-engine-command nil 'accept) + t) (t (let ((chess-engine-inhibit-auto-pass t)) - (apply 'chess-engine-default-handler event args)) + (setq return-value + (apply 'chess-engine-default-handler event args))) ;; but now transfer the event to the other engine (apply 'chess-engine-command (if (eq (current-buffer) first-engine) second-engine - first-engine) event args))))) + first-engine) event args) + + return-value)))) (defun chess-link-connect (first-engine second-engine) "Connect two engines, so that they rely events back and forth." -- cgit v1.2.3