From 1198bebb0e77e0a6e687f1bc01ad0bc868cedf68 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 7 Apr 2002 09:35:05 +0000 Subject: Games are now playable to the end. --- chess-pgn.el | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'chess-pgn.el') diff --git a/chess-pgn.el b/chess-pgn.el index 04a8575..db13793 100644 --- a/chess-pgn.el +++ b/chess-pgn.el @@ -79,18 +79,20 @@ "NYI: Still have to implement INDENTED argument." (while plies (unless for-black - (insert (format "%d. %s" index - (chess-game-ply-to-algebraic game (car plies)))) - (unless no-annotations - (chess-pgn-insert-annotations game index (car plies))) + (when (chess-ply-changes (car plies)) + (insert (format "%d. %s" index + (chess-game-ply-to-algebraic game (car plies)))) + (unless no-annotations + (chess-pgn-insert-annotations game index (car plies)))) (setq plies (cdr plies) index (1+ index))) (when plies - (when for-black - (insert (format "%d. ..." index)) - (setq for-black nil)) - (insert (format " %s" (chess-game-ply-to-algebraic game (car plies)))) - (unless no-annotations - (chess-pgn-insert-annotations game index (car plies))) + (when (chess-ply-changes (car plies)) + (when for-black + (insert (format "%d. ..." index)) + (setq for-black nil)) + (insert (format " %s" (chess-game-ply-to-algebraic game (car plies)))) + (unless no-annotations + (chess-pgn-insert-annotations game index (car plies)))) (setq plies (cdr plies))) (if plies (insert ? )))) -- cgit v1.2.3