summaryrefslogtreecommitdiff
path: root/chess-network.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-10 23:55:13 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-10 23:55:13 +0000
commita0769011c2a98841156559aa37978156766cc09f (patch)
tree407832c3c0fac049e9e7d567614894cc47e76f3c /chess-network.el
parent5fbbfaf36f1dc7da3c7539568fe473bbf079c513 (diff)
Added support for aborting a game. Use A or N from a display.
Diffstat (limited to 'chess-network.el')
-rw-r--r--chess-network.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/chess-network.el b/chess-network.el
index a4befa2..32dc70b 100644
--- a/chess-network.el
+++ b/chess-network.el
@@ -46,7 +46,11 @@
(cons "resign$"
(function
(lambda ()
- (funcall chess-engine-response-handler 'resign))))))
+ (funcall chess-engine-response-handler 'resign))))
+ (cons "abort$"
+ (function
+ (lambda ()
+ (funcall chess-engine-response-handler 'abort))))))
(defun chess-network-handler (event &rest args)
"Initialize the network chess engine."
@@ -94,6 +98,9 @@
((eq event 'resign)
(chess-engine-send nil "resign\n"))
+ ((eq event 'abort)
+ (chess-engine-send nil "abort\n"))
+
((eq event 'move)
(chess-engine-send nil (concat (chess-ply-to-algebraic (car args))
"\n")))))