From ef7c29d679c6aaf8dda55772e65800097c46f163 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 15 Apr 2002 05:40:38 +0000 Subject: *** no comment *** --- chess-common.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'chess-common.el') 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) -- cgit v1.2.3