summaryrefslogtreecommitdiff
path: root/chess-engine.el
diff options
context:
space:
mode:
Diffstat (limited to 'chess-engine.el')
-rw-r--r--chess-engine.el10
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."