summaryrefslogtreecommitdiff
path: root/chess-common.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-15 05:40:38 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-15 05:40:38 +0000
commitef7c29d679c6aaf8dda55772e65800097c46f163 (patch)
tree543f39f09bfaa6d44606804c18babff26470d4f8 /chess-common.el
parent6fbcc92505250d896b5d408483822b115bc614c7 (diff)
*** no comment ***
Diffstat (limited to 'chess-common.el')
-rw-r--r--chess-common.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/chess-common.el b/chess-common.el
index 5d8ae19..c25c1c9 100644
--- a/chess-common.el
+++ b/chess-common.el
@@ -28,7 +28,7 @@
(draw-offer-declined . "Your draw offer was declined")
(illegal-move . "Illegal move")))
-(defun chess-common-handler (event &rest args)
+(defun chess-common-handler (game event &rest args)
"Initialize the network chess engine."
(cond
((eq event 'initialize)
@@ -44,9 +44,9 @@
proc))
((eq event 'ready)
- (chess-game-set-data chess-engine-game 'active t))
+ (chess-game-set-data game 'active t))
- ((eq event 'shutdown)
+ ((eq event 'destroy)
(chess-engine-send nil "quit\n")
(dolist (file chess-common-temp-files)
(if (file-exists-p file)
@@ -74,12 +74,12 @@
;; prevent use from handling the `undo' event which this triggers
(let ((chess-engine-handling-event t))
- (chess-game-undo chess-engine-game (car args))))
+ (chess-game-undo game (car args))))
((eq event 'move)
(chess-engine-send nil (concat (chess-ply-to-algebraic (car args)) "\n"))
- (if (chess-game-over-p chess-engine-game)
- (chess-game-set-data chess-engine-game 'active nil)))))
+ (if (chess-game-over-p game)
+ (chess-game-set-data game 'active nil)))))
(provide 'chess-common)