summaryrefslogtreecommitdiff
path: root/chess-common.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-18 18:30:19 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-18 18:30:19 +0000
commit563cf2037068f67f6786172b029363aaa7d52776 (patch)
tree549c69928ccc019093fed062f6999462fbb431db /chess-common.el
parent2b0db13d4cdc3aaadd7dd458c1097c668577a072 (diff)
Many efficiency improvements and bug fixes.
Diffstat (limited to 'chess-common.el')
-rw-r--r--chess-common.el4
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)))))