From 244bfdc122b7427b3f3f96bef00415e579aff67d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 9 Apr 2002 00:00:13 +0000 Subject: Add support for generating randomized starting position, ala Fischer Random. --- chess-engine.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'chess-engine.el') 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." -- cgit v1.2.3