diff --git a/trailer.html b/trailer.html index 65eb02b..e20d540 100644 --- a/trailer.html +++ b/trailer.html @@ -246,7 +246,7 @@ return d.state === "writing" || (s && !/^(drawn|failed)/.test(s)); } function busyRun() { - return RUN && /^(writing|reviewing|revising)$/.test(String(RUN.stage || "")); + return RUN && /^(writing|reviewing|revising|judging)$/.test(String(RUN.stage || "")); } // Work happens in the worker's memory and does not survive a deploy, so a // flag saying "in progress" is only believed while it is recent. @@ -338,6 +338,30 @@ return bits.join(" · "); } + // THE WRITERS SCORE EACH OTHER. Blind, against the checklist in the guide; + // nobody marks their own script; the winner becomes head writer. + function contestHtml() { + var ready = DRAFTS.filter(function (d) { return /^ready/.test(String(d.state)) && Number(d.iteration || 1) === Number(RUN.iteration || 1); }); + if (ready.length < 2) return ""; + var c = RUN.contest, label = {}; + DRAFTS.forEach(function (d) { label[d.writer] = d.label || d.writer; }); + var btn = RUN.stage === "judging" + ? 'The writers are reading and scoring each other’s scripts… a few minutes.' + : ''; + var table = ""; + if (c && (c.ranked || []).length) { + table = '
| script | score | what the other writers said |
|---|---|---|
| ' + (i === 0 ? '★ ' : '') + '' + esc(label[r.writer] || r.writer) + + ' | ' + esc(r.score) + ' ' + esc((r.marks || []).join(", ")) + ' | + '
+ + esc(n.best || "") + ' − ' + esc(n.worst || "") + ' |
The highest scoring script’s writer is now the head writer (★). You can still choose another.
'; + } + return '