From 701e840b23240944e45d90eccd6ee5c7cc53563a Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 25 Mar 2012 19:54:09 +0200 Subject: [PATCH] Do not show links by obvious results. --- www/index.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/www/index.pl b/www/index.pl index d524ea7..5f1d2a3 100755 --- a/www/index.pl +++ b/www/index.pl @@ -271,7 +271,12 @@ EOF ($r, $b) = ($b, $r); } - printf " %.1f%%\n", $pn * 100.0; + my $num_total_games = ($num_games * ($num_games - 1)) / 2; + if (scalar @matches == $num_total_games || $prob{$player}->[$i - 1] == $trials) { + printf " %.1f%%\n", $pn * 100.0; + } else { + printf " %.1f%%\n", $pn * 100.0; + } } unless ($lowest_division) { @@ -378,7 +383,6 @@ if (defined($match_player) && defined($match_position)) { my $player_name = $players{$sorted_players[$match_player]}; if (scalar @scenario == 0) { - # FIXME: distinguish between "all played" and "none found" printf "

Fant ingen måte %s kan ende på %d. plass på.

\n", $player_name, ($match_position + 1); } else { -- 2.39.2