]> code.delx.au - gnu-emacs-elpa/commitdiff
Make game numbers displayed equal to indexes used in chess-database.
authorMario Lang <mlang@delysid.org>
Mon, 1 Sep 2008 20:32:37 +0000 (22:32 +0200)
committerMario Lang <mlang@delysid.org>
Mon, 1 Sep 2008 20:32:37 +0000 (22:32 +0200)
chess-test.el

index cf681e3dccaacbe4f129b10877ce41e8d5fc2ed5..3c52324f60e873053228a76420ca9ac65afc717b 100644 (file)
@@ -33,8 +33,8 @@
                               db-count))
                 (begin (current-time))
                 (read-count 0))
-           (message "Testing legality of games in range [%d, %d):"
-                    index last-index)
+           (message "Testing legality of games in range [%d, %d]:"
+                    index (1- last-index))
            (while (< index last-index)
              ;; Reading in the game will cause it to be converted from PGN
              ;; (this is true currently) to a chess-game, during which time
@@ -48,7 +48,7 @@
                      (setq read-count (1+ read-count)
                            ply-count
                            (+ ply-count (length (chess-game-plies game))))
-                     (if (= 0 (mod index 1000))
+                     (if (and (> index 0) (= 0 (mod index 1000)))
                          (message "Read %d games (now at game %d): %d total plies (%.2f ply/sec)"
                                   read-count index ply-count
                                   (/ (float ply-count)
@@ -62,7 +62,7 @@
                          index (error-message-string err))))
              (setq index (1+ index)))
            (message "Read %d games (up to game %d): %d plies (%.2f ply/sec, %.2f seconds)"
-                    read-count index ply-count
+                    read-count (1- index) ply-count
                     (/ (float ply-count)
                        (float
                         (time-to-seconds