diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-10 22:58:11 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-10 22:58:11 +0000 |
| commit | e0d27e16375133dbc77778a5787842017673dc4b (patch) | |
| tree | 62b655407aef0c7ed26e05bee32c505dc2242493 /chess-crafty.el | |
| parent | fa6fd6dc166f6d333ddb9c94271647956f86598d (diff) | |
added support in chess-link.el to link two engines together. if both
are computers, then they will play head to head
Diffstat (limited to 'chess-crafty.el')
| -rw-r--r-- | chess-crafty.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/chess-crafty.el b/chess-crafty.el index 260ebb5..12ffb3a 100644 --- a/chess-crafty.el +++ b/chess-crafty.el @@ -22,16 +22,17 @@ (make-variable-buffer-local 'chess-crafty-temp-files) (defvar chess-crafty-regexp-alist - (list (cons (concat "\\s-*\\(White\\|Black\\)\\s-*([0-9]+):\\s-+\\(" - chess-algebraic-regexp "\\)\\s-*$") - (function - (lambda () - (funcall chess-engine-response-handler 'move - (match-string 0))))) - (cons "Illegal move:\\s-*\\(.*\\)" - (function - (lambda () - (signal 'chess-illegal (match-string 1))))))) + (list + (cons (concat "\\(White\\|Black\\)\\s-*([0-9]+):\\s-+\\(" + chess-algebraic-regexp "\\)\\s-*$") + (function + (lambda () + (funcall chess-engine-response-handler 'move + (chess-engine-convert-algebraic (match-string 2)))))) + (cons "Illegal move:\\s-*\\(.*\\)" + (function + (lambda () + (signal 'chess-illegal (match-string 1))))))) (defun chess-crafty-handler (event &rest args) (cond |
