summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-08 07:41:57 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-08 07:41:57 +0000
commitb81694cba75b72dd0ab63c05c5bab6519c23f4dc (patch)
tree4dd05eecd52ef03b5f8d60ddff282dc3fc1bc2aa
parent4d85f396891a7394540e7937d62820e55a51d068 (diff)
*** no comment ***
-rw-r--r--chess-crafty.el15
-rw-r--r--chess-gnuchess.el13
-rw-r--r--chess-network.el2
-rw-r--r--chess.el8
4 files changed, 31 insertions, 7 deletions
diff --git a/chess-crafty.el b/chess-crafty.el
index 0bdc782..50b4dc0 100644
--- a/chess-crafty.el
+++ b/chess-crafty.el
@@ -8,6 +8,16 @@
(require 'chess-fen)
(require 'chess-algebraic)
+(defgroup chess-crafty nil
+ "The publically available chess engine 'crafty'."
+ :group 'chess-engine)
+
+(defcustom chess-crafty-path (or (executable-find "crafty")
+ (executable-find "wcrafty"))
+ "The path to the crafty executable."
+ :type 'file
+ :group 'chess-crafty)
+
(defvar chess-crafty-now-moving nil)
(defvar chess-crafty-regexp-alist
@@ -37,9 +47,10 @@
((eq event 'initialize)
(let (proc)
(message "Starting chess program 'crafty'...")
+ (unless chess-crafty-path
+ (error "Cannot find crafty executable; check `chess-crafty-path'"))
(setq proc (start-process "chess-process" (current-buffer)
- (or (executable-find "crafty")
- (executable-find "wcrafty"))))
+ chess-crafty-path))
(message "Starting chess program 'crafty'...done")
(process-send-string proc (concat "display nogeneral\n"
"display nochanges\n"
diff --git a/chess-gnuchess.el b/chess-gnuchess.el
index ba6e603..48803ea 100644
--- a/chess-gnuchess.el
+++ b/chess-gnuchess.el
@@ -8,6 +8,15 @@
(require 'chess-fen)
(require 'chess-algebraic)
+(defgroup chess-gnuchess nil
+ "The publically available chess engine 'gnuchess'."
+ :group 'chess-engine)
+
+(defcustom chess-gnuchess-path (executable-find "gnuchess")
+ "The path to the gnuchess executable."
+ :type 'file
+ :group 'chess-gnuchess)
+
(defvar chess-gnuchess-now-moving nil)
(defvar chess-gnuchess-temp-files nil)
(make-variable-buffer-local 'chess-gnuchess-temp-files)
@@ -33,8 +42,10 @@
((eq event 'initialize)
(let (proc)
(message "Starting chess program 'gnuchess'...")
+ (unless chess-gnuchess-path
+ (error "Cannot find gnuchess executable; check `chess-gnuchess-path'"))
(setq proc (start-process "chess-process" (current-buffer)
- (executable-find "gnuchess")))
+ chess-gnuchess-path))
(message "Starting chess program 'gnuchess'...done")
(process-send-string proc "nopost\n")
proc))
diff --git a/chess-network.el b/chess-network.el
index f2dedb2..5127055 100644
--- a/chess-network.el
+++ b/chess-network.el
@@ -49,7 +49,7 @@
"Initialize the network chess engine."
(cond
((eq event 'initialize)
- (let ((which (read-char "cAre you the c)lient or s)erver? "))
+ (let ((which (read-char "Are you the c)lient or s)erver? "))
proc)
(message "Starting network client/server...")
(setq proc (if (eq which ?s)
diff --git a/chess.el b/chess.el
index e0125ce..4f9e666 100644
--- a/chess.el
+++ b/chess.el
@@ -107,10 +107,12 @@ a0 243
(chess-display-create chess-default-display t) game)
(let ((engine-module
(if arg
- (intern-soft (read-string "Engine module to play against: "))
+ (intern (or (read-string "Engine module to play against: ")
+ "chess-none"))
chess-default-engine)))
- (require engine-module)
- (chess-engine-set-game (chess-engine-create engine-module) game))))
+ (when engine-module
+ (require engine-module)
+ (chess-engine-set-game (chess-engine-create engine-module) game)))))
(cons display engine)))
;;;###autoload