summaryrefslogtreecommitdiff
path: root/chess-network.el
diff options
context:
space:
mode:
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")))))