summaryrefslogtreecommitdiff
path: root/chess-clock.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-28 16:09:14 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-28 16:09:14 +0000
commit80ab4cec14452a641e741d372037dafda16ee871 (patch)
tree352324dc62ffbd3c9c651a7154a2e88338144641 /chess-clock.el
parent7248e5c89f6d53d3f2a4ecf511167af929241f76 (diff)
*** no comment ***
Diffstat (limited to 'chess-clock.el')
-rw-r--r--chess-clock.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/chess-clock.el b/chess-clock.el
index 8913908..cbb5c37 100644
--- a/chess-clock.el
+++ b/chess-clock.el
@@ -58,17 +58,16 @@
(run-with-timer 0 1 'chess-clock-tick-tock (current-buffer))))
(let ((last-ply (car (last (chess-game-plies game) 2))))
(chess-ply-set-keyword last-ply :white white)
- (chess-ply-set-keyword last-ply :black black)))))
+ (chess-ply-set-keyword last-ply :black black))))
+
+ (if (and chess-clock-timer (chess-game-over-p game))
+ (cancel-timer chess-clock-timer)
+ (setq chess-clock-timer nil)))
((eq event 'set-data)
(if (and (eq (car args) 'active)
(not (chess-game-data game 'active)))
- (chess-clock-handler game 'destroy)))
-
- ((memq event '(destroy resign drawn))
- (when chess-clock-timer
- (cancel-timer chess-clock-timer)
- (setq chess-clock-timer nil)))))
+ (chess-clock-handler game 'destroy)))))
(defvar chess-clock-tick-tocking nil)