diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-10 23:55:13 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-10 23:55:13 +0000 |
| commit | a0769011c2a98841156559aa37978156766cc09f (patch) | |
| tree | 407832c3c0fac049e9e7d567614894cc47e76f3c /chess-link.el | |
| parent | 5fbbfaf36f1dc7da3c7539568fe473bbf079c513 (diff) | |
Added support for aborting a game. Use A or N from a display.
Diffstat (limited to 'chess-link.el')
| -rw-r--r-- | chess-link.el | 13 |
1 files changed, 9 insertions, 4 deletions
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." |
