(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
((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"
(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)
((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))
"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)
(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