]> git.sesse.net Git - remoteglot-book/blobdiff - www/opening-stats.pl
Fix number-of-moves display in root PGN.
[remoteglot-book] / www / opening-stats.pl
index edbff24e3303cb103ae85b2201576cede343f70c..3affdd524ac2d72a1964719a9dcd66dc0320689d 100755 (executable)
@@ -53,7 +53,7 @@ eval {
        $root_game->{'date'} = $pgn->date;
        $root_game->{'result'} = $pgn->result;
        $root_game->{'eco'} = $pgn->eco;
-       $root_game->{'moves'} = scalar @{$pgn->moves};
+       $root_game->{'moves'} = int(((scalar @{$pgn->moves}) + 1) / 2);
 };
 
 # Explore one move out.