summaryrefslogtreecommitdiff
path: root/chess.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-12 23:14:39 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-12 23:14:39 +0000
commit867ac57bedef9d57c9d2c31cd671de8f824c8262 (patch)
tree0361756a4e342eddbd1541f4ef74871027ec64ce /chess.el
parentcd53b65c1dae595bf07e6b6cf211a94e945f1f58 (diff)
*** no comment ***
Diffstat (limited to 'chess.el')
-rw-r--r--chess.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/chess.el b/chess.el
index b2359ee..07100a0 100644
--- a/chess.el
+++ b/chess.el
@@ -112,7 +112,8 @@ minibuffer, which works well for Emacspeak users."
:type 'string
:group 'chess)
-(defun chess (&optional engine)
+;;;###autoload
+(defun chess (&optional engine disable-popup engine-response-handler
&rest engine-ctor-args)
"Start a game of chess, playing against ENGINE (a module name)."
(interactive
@@ -139,12 +140,15 @@ minibuffer, which works well for Emacspeak users."
(require 'chess-ics1)
(setq display (chess-display-create 'chess-ics1 my-color)))
+ (chess-game-set-data game 'my-color my-color)
+ (if disable-popup
(chess-display-disable-popup display))
(chess-display-set-game display game)
(chess-display-set-main display)
(let ((engine-module (or engine chess-default-engine)))
- (let ((engine (chess-engine-create engine-module)))
+ (when (and engine-module (require engine-module nil t))
+ (let ((engine (apply 'chess-engine-create engine-module nil
engine-ctor-args)))
(chess-engine-set-game* engine game)
;; for the sake of engines which are ready to play now, and
@@ -167,7 +171,8 @@ minibuffer, which works well for Emacspeak users."
(if (chess-announce-available-p)
(chess-announce-for-game game)))))))
- display))
+ (chess-display-update display t)
+
(cons display engine)))
;;;###autoload