From d58bf008b29af2176e1474e9e0f0cc4096fe047e Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 12 Apr 2014 09:21:56 +0300 Subject: [PATCH] Use number of tries when computing scores --- lib/Gruntmaster/Page/St.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Gruntmaster/Page/St.pm b/lib/Gruntmaster/Page/St.pm index 39d7b84..fad8f47 100644 --- a/lib/Gruntmaster/Page/St.pm +++ b/lib/Gruntmaster/Page/St.pm @@ -37,7 +37,7 @@ sub _generate{ my $value = $job->problem->value // LEVEL_VALUES->{$job->problem->level}; my $factor = $job->result ? 0 : 1; $factor = $1 / 100 if $job->result_text =~ /(\d+)/; - $scores{$job->owner->id}{$job->problem->id} = int ($factor * calc_score ($value, $time, $tries{$job->owner}{$job->problem}, $ct->stop - $ct->start)); + $scores{$job->owner->id}{$job->problem->id} = int ($factor * calc_score ($value, $time, $tries{$job->owner->id}{$job->problem->id}, $ct->stop - $ct->start)); $tries{$job->owner->id}{$job->problem->id}++; } else { no warnings 'numeric'; -- 2.39.2