diff options
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 |
