From 2eef64d8e2d555c44b42a439912b08b96a0d70e1 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 8 Apr 2002 22:44:48 +0000 Subject: Added code to announce moves verbally --- chess.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'chess.el') diff --git a/chess.el b/chess.el index a5066cd..b557c65 100644 --- a/chess.el +++ b/chess.el @@ -98,6 +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." +minibuffer, which works well for Emacspeak users." + :type 'boolean + :group 'chess) (defun chess (&optional arg) "Start a game of chess." @@ -112,9 +117,11 @@ a0 243 (intern (or (read-string "Engine module to play against: ") "chess-none")) chess-default-engine))) - (if (and engine-module - (require engine-module nil t)) - (chess-engine-set-game (chess-engine-create engine-module) game))))) + (when (and engine-module + (require engine-module nil t)) + (chess-engine-set-game (chess-engine-create engine-module) game) + (if chess-announce-moves + (chess-announce-for-game game t)))))) (cons display engine))) ;;;###autoload -- cgit v1.2.3