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-none.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'chess-none.el') diff --git a/chess-none.el b/chess-none.el index 104d524..e5004ef 100644 --- a/chess-none.el +++ b/chess-none.el @@ -6,19 +6,20 @@ (require 'chess-engine) -(defun chess-none-handler (event &rest args) +(defun chess-none-handler (game event &rest args) "An empty chess engine, used for fielding key events. This is only useful when two humans are playing each other, in which case this engine will do the job of accepting undos, handling resignations, etc." - (cond - ((eq event 'initialize) t) + (unless chess-engine-handling-event + (cond + ((eq event 'initialize) t) - ((memq event '(resign abort)) - (chess-engine-set-position nil)) + ((memq event '(resign abort)) + (chess-engine-set-position nil)) - ((eq event 'undo) - (chess-game-undo chess-engine-game (car args))))) + ((eq event 'undo) + (chess-game-undo game (car args)))))) (provide 'chess-none) -- cgit v1.2.3