]> code.delx.au - gnu-emacs-elpa/commitdiff
*** no comment ***
authorJohn Wiegley <johnw@newartisans.com>
Mon, 8 Apr 2002 07:41:57 +0000 (07:41 +0000)
committerJohn Wiegley <johnw@newartisans.com>
Mon, 8 Apr 2002 07:41:57 +0000 (07:41 +0000)
chess-crafty.el
chess-gnuchess.el
chess-network.el
chess.el

index 0bdc782638c12711d06072d22cc0a53c5867d8a0..50b4dc07cb4d2e602caedc514441ac4d6901dab9 100644 (file)
@@ -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
    ((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"
index ba6e603eb48d5f0ae0874b9e347cf453e0b71eca..48803eaa5d704e281af6175ac3a33e3634155e20 100644 (file)
@@ -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)
    ((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))
index f2dedb2cebedcdcf95d9e888c03fba0858a36095..512705538d8f01a98f26d3c4d212895577970489 100644 (file)
@@ -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)
index e0125ce31b8cf1296a78840341d79037f87fed1d..4f9e666013d9674f296c247e3b1ad5a6719da8a4 100644 (file)
--- 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