diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-09 21:36:44 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-09 21:36:44 +0000 |
| commit | 7b321614246d94eb6af71c38f69c0fde9965aebf (patch) | |
| tree | 3d2d06baf1e6620e73fdced555e35c5efba01c16 /chess.el | |
| parent | eb5e0a5dddb2a4f98efeb5adfeeefef5961e5545 (diff) | |
*** no comment ***
Diffstat (limited to 'chess.el')
| -rw-r--r-- | chess.el | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -98,10 +98,11 @@ a0 243 "Default engine to be used when starting a chess session." :type 'sexp :group 'chess) -(defcustom chess-announce-moves (and (executable-find "festival") t) - "If non-nil, announce your opponent's moves verbally. -This requires the utility 'festival' to be installed. If it is -installed, this variable will default to true." +(defcustom chess-announce-moves t +(defcustom chess-announce-moves t +This happens verbally if 'festival' is installed, otherwise it just +prints a message in your minibuffer, which works well for Emacspeak +users." minibuffer, which works well for Emacspeak users." :type 'boolean :group 'chess) @@ -110,25 +111,26 @@ minibuffer, which works well for Emacspeak users." "Start a game of chess." (interactive "P") (let ((game (chess-game-create)) ; start out as white always + (my-color t) display engine) (game (chess-game-create))) - (chess-game-set-data game 'my-color t) + (require chess-default-display) (chess-display-set-game - (chess-display-create chess-default-display t) game) + (chess-display-create chess-default-display my-color) game) (chess-display-set-main display) (let ((engine-module (if arg (intern (or (read-string "Engine module to play against: ") "chess-none")) chess-default-engine))) - (when (and engine-module - (require engine-module nil t)) + (let ((engine-module (or engine chess-default-engine))) (chess-engine-set-game (chess-engine-create engine-module) game) + (chess-engine-command engine 'ready)) (when chess-announce-moves (require 'chess-announce) - (chess-announce-for-game game t)))))) + (chess-announce-for-game game)))))) (cons display engine))) ;;;###autoload |
