diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-03-01 06:17:46 +0000 | 
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-03-01 06:17:46 +0000 | 
| commit | f115e4627966ae900aef55cb10f9e6207dbe7adf (patch) | |
| tree | 0718fd859aa8995889a1d7b7a5dc9007c39767df /chess-crafty.el | |
Initial revision
Diffstat (limited to 'chess-crafty.el')
| -rw-r--r-- | chess-crafty.el | 36 | 
1 files changed, 36 insertions, 0 deletions
| diff --git a/chess-crafty.el b/chess-crafty.el new file mode 100644 index 0000000..51ca30a --- /dev/null +++ b/chess-crafty.el @@ -0,0 +1,36 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Play against the crafty engine +;; +;; $Revision$ + +(require 'chess-process) + +(defgroup chess-crafty nil +  "Interface code for playing against crafty.  Uses `chess-process'." +  :group 'chess) + +(defcustom chess-crafty-command "crafty" +  "The name of the crafty program." +  :type 'string +  :group 'chess-crafty) + +;;;###autoload +(defun chess-crafty (game) +  (chess-process game 'chess-crafty-handler nil +		 (if (file-name-absolute-p chess-crafty-command) +		     chess-crafty-command +		   (executable-find chess-crafty-command)))) + +;;; Code: + +(defun chess-crafty-handler (game buffer command &rest args) +  (unless (apply 'chess-process-handler game buffer command args) +    (ignore +     (if (eq command 'initialize) +	 (process-send-string (get-buffer-process buffer) +			      "alarm off\nansi off\n"))))) + +(provide 'chess-crafty) + +;;; chess-crafty.el ends here | 
