diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-09 00:00:13 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-09 00:00:13 +0000 |
| commit | 244bfdc122b7427b3f3f96bef00415e579aff67d (patch) | |
| tree | 5ef1f55145b06d4917ccf7ae414bfb724c4041be /chess-engine.el | |
| parent | 039172c36273647bca85f156c99894c678cd6e3f (diff) | |
Add support for generating randomized starting position, ala Fischer
Random.
Diffstat (limited to 'chess-engine.el')
| -rw-r--r-- | chess-engine.el | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/chess-engine.el b/chess-engine.el index 419444b..1f4c9c9 100644 --- a/chess-engine.el +++ b/chess-engine.el @@ -68,9 +68,8 @@ (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)))))) + (chess-game-set-start-position (chess-engine-game nil) + (chess-fen-to-pos (car args)))))) (defun chess-engine-create (module &optional user-handler &rest args) (let ((regexp-alist (intern-soft (concat (symbol-name module) @@ -189,10 +188,7 @@ (apply chess-engine-event-handler event args) (cond ((eq event 'shutdown) - (chess-engine-destroy engine)) - - ((eq event 'setup) - (chess-engine-set-game engine (car args)))))) + (chess-engine-destroy engine))))) (defun chess-engine-filter (proc string) "Filter for receiving text for an engine from an outside source." |
