diff --git a/content/blog/2022-10-09-CLRG-Scoring/index.md b/content/blog/2022-10-09-CLRG-Scoring/index.md
index 9a4b988..62e829c 100644
--- a/content/blog/2022-10-09-CLRG-Scoring/index.md
+++ b/content/blog/2022-10-09-CLRG-Scoring/index.md
@@ -220,3 +220,68 @@ a low ranking from a single judge can carry a lot of weight.
+
+
+### Being in 1st provides a nice buffer
+
+Try playing around with Alice's rankings with Adjudicators 2 and 3 here.
+She has to get ranked a lot lower before her overall ranking starts going down.
+
+
\ No newline at end of file
diff --git a/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs b/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs
index 8a75ef8..cdacf31 100644
--- a/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs
+++ b/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs
@@ -3,6 +3,7 @@ import {awardPoints} from "./awardPoints.mjs"
function scorecardUpdate(scorecard) {
let scores = []
let points = []
+ let highestRank = []
let firstRow = scorecard.querySelector("tbody tr")
for (let input of firstRow.querySelectorAll("input")) {
@@ -16,6 +17,7 @@ function scorecardUpdate(scorecard) {
let ranking = Number(input.value)
scores[i] += ranking
points[i] += awardPoints[ranking]
+ highestRank[i] = Math.min(highestRank[i] || 100, ranking)
i += 1
}
}
@@ -29,10 +31,19 @@ function scorecardUpdate(scorecard) {
}
{
+ let rankOffset = 0
+ let overallRanking = []
let rankedPoints = [...points].sort((a, b) => b - a)
+ for (let i = 0; i < points.length; i++) {
+ overallRanking[i] = rankedPoints.indexOf(points[i]) + 1
+ if (overallRanking[i] == 1) {
+ rankOffset = highestRank[i]
+ }
+ }
+
let i = 0
for (let out of scorecard.querySelectorAll("tfoot output[name='ranking']")) {
- out.value = rankedPoints.indexOf(points[i]) + 1
+ out.value = rankedPoints.indexOf(points[i]) + rankOffset
i += 1
}
}
diff --git a/content/blog/2022-10-09-CLRG-Scoring/toys.css b/content/blog/2022-10-09-CLRG-Scoring/toys.css
index f52481e..7cf3861 100644
--- a/content/blog/2022-10-09-CLRG-Scoring/toys.css
+++ b/content/blog/2022-10-09-CLRG-Scoring/toys.css
@@ -6,6 +6,11 @@
display: initial;
}
+.scrolly {
+ max-width: 100%;
+ overflow-x: auto;
+}
+
.awardPoints {
display: inline-block;
max-height: 60vh;