From: Steinar H. Gunderson Date: Sun, 14 Dec 2014 10:39:18 +0000 (+0100) Subject: Fix number-of-moves display in root PGN. X-Git-Url: https://git.sesse.net/?p=remoteglot-book;a=commitdiff_plain;h=93fde895b68fe24c7abb9237460b6cf352ac63d9 Fix number-of-moves display in root PGN. --- diff --git a/www/opening-stats.pl b/www/opening-stats.pl index edbff24..3affdd5 100755 --- a/www/opening-stats.pl +++ b/www/opening-stats.pl @@ -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.