summaryrefslogtreecommitdiff
path: root/chess-pgn.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-16 02:43:19 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-16 02:43:19 +0000
commitbd0bd1965bbc3a18c0f5a218e417778c295bdd1f (patch)
treec58096b7b958fedf501f98b5cf46c88c723861f7 /chess-pgn.el
parent40eddef43dfde4f1f14101e1f3bbc0d4621c8a37 (diff)
Major speed improvement and efficiency work. chess-legal-plies is
much more memory conservative now. Reduced recursion in chess-search-position by a slight bit.
Diffstat (limited to 'chess-pgn.el')
-rw-r--r--chess-pgn.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/chess-pgn.el b/chess-pgn.el
index 91b9832..162d640 100644
--- a/chess-pgn.el
+++ b/chess-pgn.el
@@ -38,8 +38,8 @@
(goto-char (match-end 0))
(chess-game-set-tag game "Result" (match-string-no-properties 0))
(unless (eq t (car (last plies)))
- (nconc plies (list (chess-ply-create
- (chess-ply-next-pos (car (last plies)))))))
+ (nconc plies (list (chess-ply-create*
+ (chess-ply-next-pos (car (last plies))) t))))
(throw 'done t))
((looking-at "{")
@@ -61,8 +61,8 @@
(throw 'done t))
(t
- (nconc plies (list (chess-ply-create
- (chess-ply-next-pos (car (last plies))))))
+ (nconc plies (list (chess-ply-create*
+ (chess-ply-next-pos (car (last plies))) t)))
(throw 'done t)))
(skip-chars-forward " \t\n")))
(cdr plies)))
@@ -92,9 +92,9 @@
(chess-fen-to-pos fen)
(chess-pos-copy chess-starting-position)) t)
;; set the starting position to the FEN string
- (list (chess-ply-create (if fen
- (chess-fen-to-pos fen)
- chess-starting-position))))))
+ (list (chess-ply-create* (if fen
+ (chess-fen-to-pos fen)
+ chess-starting-position) fen)))))
game)))
(defun chess-pgn-insert-annotations (game index ply)