From: Steinar H. Gunderson Date: Sun, 25 Mar 2012 17:54:09 +0000 (+0200) Subject: Do not show links by obvious results. X-Git-Url: https://git.sesse.net/?p=wloh;a=commitdiff_plain;h=701e840b23240944e45d90eccd6ee5c7cc53563a Do not show links by obvious results. --- 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 {