]> git.sesse.net Git - foosball/blobdiff - recalc-single-result.pl
Parametrize initial rating/RD instead of hardcoding it.
[foosball] / recalc-single-result.pl
index 679478791027ecb283f9ea6a88028b9ac8fc3d19..8c6923b83c10977888d589c20870e87ea84faf3a 100755 (executable)
@@ -21,7 +21,7 @@ my $cll = 0.0;
 while (my $ref = $q->fetchrow_hashref) {
        for my $user (($ref->{'username1'}, $ref->{'username2'})) {
                if (!exists($ratings{$user})) {
-                       $ratings{$user} = [ 1500, 350, 0 ];
+                       $ratings{$user} = [ $foosball::initial_rating, $foosball::initial_rd, 0 ];
                }
        }