diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-08 23:03:39 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-08 23:03:39 +0000 |
| commit | c67544683ffed1660bad0d5e67a6e5d47e288be1 (patch) | |
| tree | b1fe54ca64b0458e753e77aec16368c012a77fb8 /chess-engine.el | |
| parent | ecaf5a3842adc0bd38b069184a031b8530c620cb (diff) | |
*** no comment ***
Diffstat (limited to 'chess-engine.el')
| -rw-r--r-- | chess-engine.el | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/chess-engine.el b/chess-engine.el index 318c205..419444b 100644 --- a/chess-engine.el +++ b/chess-engine.el @@ -56,7 +56,21 @@ (defun chess-engine-default-handler (event &rest args) (cond ((eq event 'move) - (chess-engine-do-move (car args))))) + (chess-engine-do-move (car args))) + + ((eq event 'pass) + (message "Your opponent has passed the first move to you")) + + ((eq event 'connect) + (message "Your opponent, %s, is now ready to play" (car args))) + + ((eq event 'quit) + (message "Your opponent has quit playing")) + + ((eq event 'setup) + (let* ((position (chess-fen-to-pos (car args))) + (ply (chess-ply-create position))) + (chess-game-set-plies (chess-engine-game nil) (list ply)))))) (defun chess-engine-create (module &optional user-handler &rest args) (let ((regexp-alist (intern-soft (concat (symbol-name module) @@ -178,10 +192,7 @@ (chess-engine-destroy engine)) ((eq event 'setup) - (chess-engine-set-game engine (car args))) - - ((eq event 'pass) - (chess-engine-pass engine))))) + (chess-engine-set-game engine (car args)))))) (defun chess-engine-filter (proc string) "Filter for receiving text for an engine from an outside source." |
