summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-09 09:21:49 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-09 09:21:49 +0000
commita38688d2c10528e1fcafd7ce10ec395ab7ac3586 (patch)
tree96c05f170df7aa00d9a26db3fc38b10dd6ab91d1
parent0d88aacaee63aa887b089e963103aa3f1cef4891 (diff)
*** no comment ***
-rw-r--r--chess-game.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/chess-game.el b/chess-game.el
index a33971f..cd39624 100644
--- a/chess-game.el
+++ b/chess-game.el
@@ -82,15 +82,23 @@
(chess-game-run-hooks game 'delete-tag tag))
+(defsubst chess-game-data (game)
+ (nth 2 game))
+
+(defsubst chess-game-set-data (game data)
+ (setcar (nthcdr 1 game) data)
+ (chess-game-run-hooks game 'set-data))
+
+
(defsubst chess-game-plies (game)
"Return the tags alist associated with GAME."
- (nth 2 game))
+ (nth 3 game))
(defalias 'chess-game-main-var 'chess-game-plies)
(defsubst chess-game-set-plies (game plies)
"Return the tags alist associated with GAME."
- (setcdr (nthcdr 1 game) (list plies))
+ (setcdr (nthcdr 2 game) (list plies))
(chess-game-run-hooks game 'setup (chess-ply-pos (car (last plies)))))
(defsubst chess-game-set-start-position (game position)
@@ -131,7 +139,7 @@
Optionally use the given starting POSITION.
TAGS is the starting set of game tags (which can always be changed
later using the various tag-related methods)."
- (let ((game (list nil tags
+ (let ((game (list nil tags nil
(list (chess-ply-create (or position
(chess-pos-create)))))))
(dolist (tag (cons (cons "Date" (format-time-string "%Y.%m.%d"))