diff options
Diffstat (limited to 'chess-common.el')
| -rw-r--r-- | chess-common.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chess-common.el b/chess-common.el index 347bbd6..d568dad 100644 --- a/chess-common.el +++ b/chess-common.el @@ -8,7 +8,9 @@ (require 'chess-engine) +(defvar chess-common-engine-name nil) (defvar chess-common-temp-files nil) +(make-variable-buffer-local 'chess-common-engine-name) (make-variable-buffer-local 'chess-common-temp-files) (defmacro chess-with-temp-file (&rest body) @@ -76,6 +78,8 @@ (chess-game-undo game (car args)))) ((eq event 'move) + (if (= 1 (chess-game-index game)) + (chess-game-set-tag game "Black" chess-engine-opponent-name)) (chess-engine-send nil (concat (chess-ply-to-algebraic (car args)) "\n")) (if (chess-game-over-p game) (chess-game-set-data game 'active nil))))) |
