summaryrefslogtreecommitdiff
path: root/chess-engine.el
diff options
context:
space:
mode:
Diffstat (limited to 'chess-engine.el')
-rw-r--r--chess-engine.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/chess-engine.el b/chess-engine.el
index a207c34..f05ff56 100644
--- a/chess-engine.el
+++ b/chess-engine.el
@@ -57,8 +57,7 @@
(defsubst chess-engine-convert-algebraic (move &optional trust-check)
(or (chess-algebraic-to-ply (chess-engine-position nil) move trust-check)
- (ignore
- (message "Received invalid move string: %s" move))))
+ (chess-engine-command nil 'illegal)))
(defsubst chess-engine-convert-fen (fen)
(or (chess-fen-to-pos fen)
@@ -234,7 +233,10 @@
(setq chess-engine-pending-offer nil
chess-engine-pending-arg nil)
- t))))
+ t))
+
+ ((eq event 'illegal)
+ (message "Your opponent states your last command was illegal"))))
(defun chess-engine-create (game module &optional response-handler
&rest handler-ctor-args)