diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-15 05:40:38 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-15 05:40:38 +0000 |
| commit | ef7c29d679c6aaf8dda55772e65800097c46f163 (patch) | |
| tree | 543f39f09bfaa6d44606804c18babff26470d4f8 /chess-none.el | |
| parent | 6fbcc92505250d896b5d408483822b115bc614c7 (diff) | |
*** no comment ***
Diffstat (limited to 'chess-none.el')
| -rw-r--r-- | chess-none.el | 15 |
1 files changed, 8 insertions, 7 deletions
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) |
