summaryrefslogtreecommitdiff
path: root/chess-network.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-05-01 23:15:00 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-05-01 23:15:00 +0000
commitf43a2ebec00d93a8898715cd73bec03f277744e9 (patch)
treec9e27d2fa6c8c1406ab05c016bd2ad8252f56585 /chess-network.el
parent3169a8123361adb22387572b0c4647ce32c1917c (diff)
added code for forfeiting on time
Diffstat (limited to 'chess-network.el')
-rw-r--r--chess-network.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/chess-network.el b/chess-network.el
index f4a369b..e78eabc 100644
--- a/chess-network.el
+++ b/chess-network.el
@@ -74,6 +74,10 @@
(function
(lambda ()
(funcall chess-engine-response-handler 'call-flag))))
+ (cons "forfeit$"
+ (function
+ (lambda ()
+ (funcall chess-engine-response-handler 'flag-fell))))
(cons "kibitz\\s-+\\(.+\\)$"
(function
(lambda ()
@@ -195,6 +199,10 @@
((eq event 'set-index)
(chess-engine-send nil (format "index %d\n" (car args))))
+ ((eq event 'flag-fell)
+ (chess-engine-send nil "forfeit\n")
+ (chess-common-handler game 'flag-fell))
+
(t
(apply 'chess-common-handler game event args)))))