summaryrefslogtreecommitdiff
path: root/chess-game.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-12 10:59:33 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-12 10:59:33 +0000
commitc6d397dde9c2c5dd2d1be993ffe3117bc25e6fb8 (patch)
tree83c1ea17fdce15588c96147c6df7495e3bd875b6 /chess-game.el
parentde037adf033425192efefb66f098037766c6932e (diff)
*** no comment ***
Diffstat (limited to 'chess-game.el')
-rw-r--r--chess-game.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/chess-game.el b/chess-game.el
index f81f888..138fc36 100644
--- a/chess-game.el
+++ b/chess-game.el
@@ -128,7 +128,7 @@ matches."
(defsubst chess-game-set-plies (game plies)
"Return the tags alist associated with GAME."
(setcdr (nthcdr 2 game) (list plies))
- (chess-game-run-hooks game 'setup-game))
+ (chess-game-run-hooks game 'setup-game game))
(defsubst chess-game-set-start-position (game position)
"Return the tags alist associated with GAME."
@@ -160,15 +160,14 @@ matches."
(let ((plies (chess-game-plies game)))
(if plies
(nconc plies (list ply))
- (chess-game-set-plies game (list ply)))))
+ (let ((chess-game-inhibit-events t))
+ (chess-game-set-plies game (list ply))))))
(defun chess-game-undo (game count)
"Undo the last COUNT plies of GAME."
(if (> count (chess-game-index game))
(error "Cannot undo further")
- (chess-game-set-plies game (nbutlast (chess-game-plies game) count))
- ;;(chess-game-run-hooks game 'undo count)
- ))
+ (chess-game-set-plies game (nbutlast (chess-game-plies game) count))))
(defsubst chess-game-over-p (game)
@@ -223,7 +222,7 @@ progress (nil), if it is drawn, resigned, mate, etc."
(chess-game-set-tag game "Result" (if color "0-1" "1-0"))
(if (chess-ply-has-keyword ply :resign)
(chess-game-run-hooks game 'resign color)
- (chess-game-run-hooks game 'game-over))))
+ (chess-game-run-hooks game 'move current-ply))))
(t
(chess-game-run-hooks game 'move current-ply)))))