]> code.delx.au - gnu-emacs-elpa/blobdiff - chess.el
chess-perft.el: move generator testing.
[gnu-emacs-elpa] / chess.el
index 55ea4654f01ca7ead39990c78720d1bf72abb714..541715db52562c8e7496c93ba4ef8f44adf67c4d 100644 (file)
--- a/chess.el
+++ b/chess.el
@@ -107,7 +107,10 @@ These can do just about anything."
   :group 'chess)
 
 (defcustom chess-default-engine
-  '(chess-crafty chess-gnuchess chess-phalanx chess-ai)
+  '(chess-crafty
+    chess-stockfish chess-glaurung chess-fruit
+    chess-gnuchess chess-phalanx
+    chess-ai)
   "Default engine to be used when starting a chess session.
 A list indicates a series of alternatives if the first engine is not
 available."
@@ -156,7 +159,9 @@ If an element of MODULE-LIST is a sublist, treat it as alternatives."
          ;; this module is actually a list, which means keep trying
          ;; until we find one that works
          (while module
-           (if (setq object (apply create-func (car module) args))
+           (if (setq object (condition-case nil
+                                (apply create-func (car module) args)
+                              (error nil)))
                (progn
                  (push object objects)
                  (setq module nil))
@@ -170,7 +175,9 @@ If an element of MODULE-LIST is a sublist, treat it as alternatives."
 ;;;###autoload
 (defun chess (&optional engine disable-popup engine-response-handler
                        &rest engine-ctor-args)
-  "Start a game of chess, playing against ENGINE (a module name)."
+  "Start a game of chess, playing against ENGINE (a module name).
+With prefix argument, prompt for the engine to play against.
+Otherwise use `chess-default-engine' to determine the engine."
   (interactive
    (list
     (if current-prefix-arg
@@ -207,8 +214,8 @@ If an element of MODULE-LIST is a sublist, treat it as alternatives."
                                           'chess--create-engine game
                                           engine-response-handler
                                           engine-ctor-args)
-                  ;(error nil))
-                    ))
+                  ;  (error nil))
+           ))
          objects)
 
     (unless (car objects)