projects
/
gruntmaster-page.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
17080e2
)
Use number of tries when computing scores
author
Marius Gavrilescu
<marius@ieval.ro>
Sat, 12 Apr 2014 06:21:56 +0000
(09:21 +0300)
committer
Marius Gavrilescu
<marius@ieval.ro>
Sat, 12 Apr 2014 06:22:38 +0000
(09:22 +0300)
lib/Gruntmaster/Page/St.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Page/St.pm
b/lib/Gruntmaster/Page/St.pm
index 39d7b84358f1320f4a39af8184b1cfb18dd59250..fad8f478bdf82cf12a94b878f58d1a13d172f70c 100644
(file)
--- 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+)/;
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';
$tries{$job->owner->id}{$job->problem->id}++;
} else {
no warnings 'numeric';
This page took
0.009766 seconds
and
4
git commands to generate.