fix weighting bug with sandia tokens

This commit is contained in:
Neale Pickett 2013-02-06 19:54:31 -07:00
parent ab838fb8a4
commit 038e707301
1 changed files with 110 additions and 111 deletions

View File

@ -88,12 +88,6 @@ BEGIN {
close(fn) close(fn)
} }
# Total points possible so far in this category
if (! ((cat, points) in cat_pointval)) {
cat_total[cat] += points
cat_pointval[cat, points] = 1
}
# Enumerate categories # Enumerate categories
if (! (cat in seen_cats)) { if (! (cat in seen_cats)) {
seen_cats[cat] = 1 seen_cats[cat] = 1
@ -102,6 +96,11 @@ BEGIN {
# Points this team has in this category # Points this team has in this category
cat_points[hash, cat] += points cat_points[hash, cat] += points
# Token-based categories can make cat_pointval irrelevant
if (cat_points[hash, cat] > cat_total[cat]) {
cat_total[cat] = cat_points[hash, cat]
}
} }
END { END {