Make Sokko TCG's Current Race fairer and explain each race afterwards
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 23m50s
Validate and deploy Sokko G / deploy (push) Successful in 18s

Players kept finishing third or fourth: opponents were played better than
their owners would (always the best runner, half of them with perfect
boosts and no reaction time), and the Watchers recruited knowing the day's
circuit, which players never see.

- A player who already ran today now comes back as a ghost with their real
  race; other teams play like an attentive player (best runner, each
  teammate given in a zone of its best stat after a reaction delay). The
  Watchers recruit blind; only the strong one plays attentively. The
  administration counts the ghosts.
- The rule that a boost keeps the value of the zone where it was given is
  now stated before and during the race.
- A boosting teammate is greyed at once with "Élan donné", a 1.5 s bar and
  its locked value; the others dim while the player has to wait.
- The result shows the place as a medal, the finish as lanes (with a gold
  silhouette at the best boosts), the three times, each boost placed on
  the circuit (dashed in the teammate's best stat when it was worth more
  elsewhere), a sentence per boost to place better and, when clearly
  faster, another runner. The best boosts are searched in the browser.
- A development-only "Recourir (dev)" button erases the race and keeps the
  team.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-30 16:18:18 +01:00
parent 8253f74c90
commit 52df57f781
16 changed files with 603 additions and 102 deletions

View file

@ -1,6 +1,6 @@
// Rôle : course en direct : décompte, animation des quatre coureurs, équipiers à cliquer pour donner leurs élans.
import { useCallback, useEffect, useRef, useState } from "react";
import { RACE_LENGTH } from "../../../../services/cards/race-rules.js";
import { BOOST_FACTOR, BOOST_MS, RACE_LENGTH } from "../../../../services/cards/race-rules.js";
import { fillTemplate } from "./dailyShare.js";
import { MaskIcon } from "./ExpeditionLabels.jsx";
import { activeHelper, advanceRace, advanceToNextChoice, allRuns, canGiveBoost, createRace, giveBoost, imageOf, nameOf, playerZone, raceOver, racerName } from "./raceRun.js";
@ -14,13 +14,15 @@ const MAX_FRAME_MS = 250;
const reducedMotion = () => Boolean(globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches);
// Ce que l'écran montre d'une course, hors avancée des coureurs : il ne change que quelques fois par course.
// Ce que l'écran montre d'une course, hors avancée des coureurs : il ne change que quelques fois par course. `boostValue` : la stat
// figée de l'élan en cours, prise dans la zone du clic.
function snapshot(race) {
const { run } = race.player;
return { zone: playerZone(race), used: run.used, helpers: allRuns(race).map(activeHelper), finished: run.finishedAt !== null, over: raceOver(race) };
const helpers = allRuns(race).map(activeHelper);
return { zone: playerZone(race), used: run.used, helpers, boostValue: helpers[0] >= 0 ? Math.round(run.boostSpeed / BOOST_FACTOR) : null, finished: run.finishedAt !== null, over: raceOver(race) };
}
const sameSnapshot = (left, right) => left.zone === right.zone && left.finished === right.finished && left.over === right.over && left.used.length === right.used.length && left.helpers.every((helper, index) => helper === right.helpers[index]);
const sameSnapshot = (left, right) => left.zone === right.zone && left.boostValue === right.boostValue && left.finished === right.finished && left.over === right.over && left.used.length === right.used.length && left.helpers.every((helper, index) => helper === right.helpers[index]);
export function RaceLive({ catalog, race, companions, content, teamContent, statLabels, onBoost, onFinish, onOver }) {
const [stepped] = useState(reducedMotion);
@ -122,17 +124,21 @@ export function RaceLive({ catalog, race, companions, content, teamContent, stat
<span><MaskIcon name={stat} />{fillTemplate(content.zone, { stat: statLabels[stat], value: race.runner.stats[stat] })}</span>
<span>{nextStat ? fillTemplate(content.nextZone, { stat: statLabels[nextStat] }) : content.lastZone}</span>
</p>
<ul className="nebula-race-helpers">{race.helpers.map((helper, index) => {
<ul className="nebula-race-helpers" data-boosting={view.helpers[0] >= 0 || undefined}>{race.helpers.map((helper, index) => {
const used = view.used.includes(index);
const active = view.helpers[0] === index;
const blocked = used || !started || view.helpers[0] >= 0;
const name = nameOf(catalog, helper.cardId, teamContent);
// L'équipier qui donne son élan est tout de suite marqué : sa valeur est figée, une barre montre le temps qui reste.
const value = active ? view.boostValue : helper.stats[stat];
const label = active ? content.helperActive : used ? content.helperUsed : content.helperLabel;
return <li key={helper.cardId}><button className="nebula-race-mate" type="button" data-active={active || undefined} data-used={(used && !active) || undefined} aria-disabled={blocked || undefined}
aria-label={fillTemplate(used ? content.helperUsed : content.helperLabel, { card: name, stat: statLabels[stat], value: helper.stats[stat] })} style={{ ...specialtyStyle(companionOf(helper.cardId) || { specialties: [] }), "--specialty": `var(--color-stat-${stat})` }} onClick={() => boost(index)}>
<span className="nebula-race-mate-art"><img src={imageOf(catalog, helper.cardId)} alt="" /><kbd aria-hidden="true">{index + 1}</kbd></span>
aria-label={fillTemplate(label, { card: name, stat: statLabels[stat], value })} style={{ ...specialtyStyle(companionOf(helper.cardId) || { specialties: [] }), "--specialty": `var(--color-stat-${stat})` }} onClick={() => boost(index)}>
<span className="nebula-race-mate-art"><img src={imageOf(catalog, helper.cardId)} alt="" /><kbd aria-hidden="true">{index + 1}</kbd>
{active && <span className="nebula-race-mate-boost" aria-hidden="true" style={{ "--boost-ms": `${BOOST_MS}ms` }}>{content.boosting}<i /></span>}</span>
<SpecialtyBand companion={companionOf(helper.cardId) || { specialties: [] }} content={teamContent} statLabels={statLabels} />
<span className="nebula-race-mate-name">{name}</span>
<strong>+{helper.stats[stat]}</strong>
<strong>+{value}</strong>
</button></li>;
})}</ul>
<div className="nds-toolbar nebula-race-help">

View file

@ -1,31 +1,11 @@
// Rôle : page de la Course des courants : choix du coureur, course en direct, course interrompue et résultat.
import { useEffect, useRef, useState } from "react";
import { finishRace, loadTeam, recordRaceBoosts, startRace } from "./cardsApi.js";
import { fillTemplate, formatCountdown } from "./dailyShare.js";
import { finishRace, loadTeam, recordRaceBoosts, resetRace, startRace } from "./cardsApi.js";
import { RaceLive } from "./RaceLive.jsx";
import { imageOf, nameOf, racerName, raceRanking } from "./raceRun.js";
import { RaceResult } from "./RaceResult.jsx";
import { RaceCircuit } from "./RaceTrack.jsx";
import { formatStardust } from "./stardustFormat.js";
import { TeamCompanion } from "./TeamCompanion.jsx";
const formatTime = (milliseconds) => `${(milliseconds / 1_000).toLocaleString("fr-FR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} s`;
const placeText = (place, content) => fillTemplate(place === 1 ? content.placeFirst : content.placeOther, { place });
function RaceResult({ catalog, race, nextAt, content, teamContent, titleRef }) {
const [now] = useState(() => Date.now());
const ranking = raceRanking(race);
return <section className="nds-panel nebula-race-result" aria-labelledby="nebula-race-result-title" data-place={race.place}>
<h3 id="nebula-race-result-title" ref={titleRef} tabIndex={-1}>{placeText(race.place, content)}</h3>
<p className="nebula-race-reward">{race.reward > 0 ? fillTemplate(content.earned, { reward: formatStardust(race.reward) }) : content.noReward}</p>
<ol className="nebula-race-ranking">{ranking.map((entry, index) => <li key={entry.index} data-player={entry.player || undefined}>
<span>{index + 1}</span><img src={imageOf(catalog, entry.runner.cardId)} alt="" />
<span><strong>{entry.player ? content.you : racerName(entry, content)}</strong><small>{nameOf(catalog, entry.runner.cardId, teamContent)}</small></span>
<span>{formatTime(entry.finishedAt)}</span>
</li>)}</ol>
<p className="nebula-race-next">{fillTemplate(content.next, { time: formatCountdown(nextAt - now) })}</p>
</section>;
}
export function RacePanel({ catalog, runMutation, busy, content, teamContent, statLabels }) {
const [team, setTeam] = useState(null);
const [loadError, setLoadError] = useState("");
@ -94,6 +74,15 @@ export function RacePanel({ catalog, runMutation, busy, content, teamContent, st
setLive(null);
}
// Développement : la course du jour s'efface, l'équipe reste.
async function rerun() {
const next = await play(() => resetRace());
if (!next) return;
setLive(null);
setFinished(null);
setTeam(next);
}
async function finishInterrupted() {
const next = await finish(null);
if (next) setTeam(next);
@ -105,13 +94,13 @@ export function RacePanel({ catalog, runMutation, busy, content, teamContent, st
return <section className="nebula-race" aria-labelledby="nebula-race-title">
<div className="nds-section-heading nebula-section-heading">
<div><p className="eyebrow">{content.eyebrow}</p><h2 id="nebula-race-title">{content.title}</h2></div>
<div className="nebula-team-heading-actions"><a className="nds-button" data-size="sm" data-variant="secondary" href="#/cards/guild">{content.back}</a></div>
<div className="nebula-team-heading-actions">{team.devReset && <button className="nds-button" data-size="sm" data-variant="danger" type="button" disabled={busy} onClick={rerun}>{content.devReset}</button>}<a className="nds-button" data-size="sm" data-variant="secondary" href="#/cards/guild">{content.back}</a></div>
</div>
{notice && <p className="nds-inline-notice" data-variant="warning" role="status">{notice}</p>}
{live && <RaceLive key={live.day} catalog={catalog} race={live} companions={team.companions} content={content} teamContent={teamContent} statLabels={statLabels}
onBoost={(boosts) => { recordRaceBoosts(boosts).catch(() => {}); }} onFinish={finish} onOver={over} />}
{interrupted && <div className="nds-panel nebula-race-interrupted"><h3>{content.interruptedTitle}</h3><p>{content.interruptedText}</p><button className="nds-button" data-variant="primary" type="button" disabled={busy} onClick={finishInterrupted}>{content.interruptedAction}</button></div>}
{showResult && <RaceResult catalog={catalog} race={race} nextAt={team.nextAt} content={content} teamContent={teamContent} titleRef={titleRef} />}
{showResult && <RaceResult catalog={catalog} race={race} nextAt={team.nextAt} content={content} teamContent={teamContent} statLabels={statLabels} titleRef={titleRef} />}
{!live && !race && !choosing && <div className="nds-empty-state"><p>{!team.enabled ? teamContent.closed : !team.raceEnabled ? content.closed : content.needTeam}</p>{team.raceEnabled && <a className="nds-button" data-variant="primary" href="#/cards/team">{content.recruitFirst}</a>}</div>}
{choosing && <>
<RaceCircuit zones={team.zones} content={content} statLabels={statLabels} />

View file

@ -0,0 +1,125 @@
// Rôle : résultat d'une Course des courants finie : la place et la récompense, l'arrivée en couloirs, puis le bilan (temps, élans
// posés sur le circuit, équipiers), pour apprendre après coup sans être guidé pendant la course.
import { useMemo, useState } from "react";
import { CurrencyIcon } from "./Currency.jsx";
import { fillTemplate, formatCountdown } from "./dailyShare.js";
import { MaskIcon } from "./ExpeditionLabels.jsx";
import { imageOf, nameOf, racerName, raceRanking, raceReview } from "./raceRun.js";
import { formatStardust } from "./stardustFormat.js";
const formatTime = (milliseconds) => `${(milliseconds / 1_000).toLocaleString("fr-FR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} s`;
const placeText = (place, content) => fillTemplate(place === 1 ? content.placeFirst : content.placeOther, { place });
const ordinal = (place) => `${place}${place === 1 ? "re" : "e"}`;
// En dessous, l'écart avec les meilleurs élans ne vaut pas d'être signalé.
const NEAR_BEST_MS = 150;
// Arrivée en couloirs, du premier au dernier : chaque coureur est placé selon son temps, le plus rapide contre la ligne d'arrivée.
// Dans le couloir du joueur, une silhouette dorée montre où l'auraient mené les meilleurs élans.
function RaceFinish({ catalog, race, review, showBest, content, teamContent }) {
const ranking = raceRanking(race);
const times = [...ranking.map((entry) => entry.finishedAt), ...(showBest ? [review.best] : [])];
const [fastest, slowest] = [Math.min(...times), Math.max(...times)];
const at = (time) => (slowest === fastest ? 1 : (slowest - time) / (slowest - fastest));
return <ol className="nebula-race-finish">{ranking.map((entry, index) => {
const image = imageOf(catalog, entry.runner.cardId);
return <li key={entry.index} data-player={entry.player || undefined}>
<span className="nebula-race-finish-place">{index + 1}</span>
<span className="nebula-race-finish-who"><img src={image} alt="" />
<span><strong>{entry.player ? content.you : racerName(entry, content)}</strong><small>{nameOf(catalog, entry.runner.cardId, teamContent)}{entry.ghost && ` · ${content.ghost}`}</small></span></span>
<span className="nebula-race-finish-track" aria-hidden="true">
{entry.player && showBest && <>
<span className="nebula-race-finish-gap" style={{ "--from": at(entry.finishedAt), "--to": at(review.best) }} />
<img className="nebula-race-finish-ghost" src={image} alt="" style={{ "--at": at(review.best) }} />
</>}
<img className="nebula-race-finish-runner" src={image} alt="" style={{ "--at": at(entry.finishedAt) }} />
</span>
<span className="nebula-race-finish-time">{formatTime(entry.finishedAt)}{entry.player && showBest && <small aria-hidden="true">{fillTemplate(content.reviewBestTime, { time: formatTime(review.best) })}</small>}</span>
</li>;
})}</ol>;
}
// Remplit un texte dont les valeurs peuvent être des éléments (nom de zone en couleur, nombre en gras).
function fillParts(template, values) {
return template.split(/(\{\w+\})/).map((part, index) => {
const key = part.match(/^\{(\w+)\}$/)?.[1];
return key && key in values ? <span key={index}>{values[key]}</span> : part;
});
}
// Nom d'une zone, à sa couleur et avec son icône.
function ZoneName({ stat, statLabels }) {
return <span className="nebula-race-zone-name" style={{ "--specialty": `var(--color-stat-${stat})` }}><MaskIcon name={stat} />{statLabels[stat]}</span>;
}
function RaceReview({ catalog, race, review, content, teamContent, statLabels }) {
const gain = review.mine - review.best;
const perfect = gain <= NEAR_BEST_MS;
// Pas de phrase à part : ce que les temps ne disent pas d'eux-mêmes (écart, place possible, élans presque parfaits) tient sous
// le temps des meilleurs élans.
const bestNote = perfect
? (race.place === 1 ? content.reviewBestPerfect : content.reviewBestPerfectBeaten)
: fillTemplate(review.bestPlace < race.place ? content.reviewBestGainPlace : content.reviewBestGain, { gain: formatTime(gain), place: ordinal(review.bestPlace) });
const tiles = [
{ key: "plain", label: content.reviewPlain, time: review.plain },
{ key: "mine", label: content.reviewMine, time: review.mine, note: fillTemplate(content.reviewBoostsGain, { gain: formatTime(review.plain - review.mine) }) },
{ key: "best", label: content.reviewBest, time: review.best, note: bestNote, perfect }
];
const name = (cardId) => nameOf(catalog, cardId, teamContent);
const missed = review.boosts.filter((boost) => !boost.stat || boost.value < boost.bestValue);
return <section className="nds-panel nebula-race-review" aria-labelledby="nebula-race-review-title">
<h3 id="nebula-race-review-title">{content.reviewTitle}</h3>
<ol className="nebula-race-review-times">{tiles.map((tile) => <li key={tile.key} data-kind={tile.key} data-perfect={tile.perfect || undefined}>
<span>{tile.label}</span><strong>{formatTime(tile.time)}</strong>{tile.note && <small>{tile.note}</small>}
</li>)}</ol>
{/* Le choix du coureur vient avant les élans : la remarque passe avant le circuit. */}
{review.fasterRunner && <p className="nebula-race-review-runner"><img src={imageOf(catalog, review.fasterRunner)} alt="" />
<span>{fillParts(content.reviewRunner, { card: <strong>{name(review.fasterRunner)}</strong>, runner: <strong>{name(race.runner.cardId)}</strong> })}</span></p>}
<h4>{content.reviewBoostsTitle}</h4>
<ol className="nebula-race-review-road" aria-label={content.reviewRoadLabel}>{race.zones.map((stat, zone) => {
const here = review.boosts.filter((boost) => boost.zone === zone);
return <li key={zone} style={{ "--specialty": `var(--color-stat-${stat})` }}>
<span className="nebula-race-review-zone"><MaskIcon name={stat} /><span>{statLabels[stat]}</span></span>
<span className="nebula-race-review-given">{here.map((boost) => {
const missed = boost.value < boost.bestValue;
// Élan qui valait plus ailleurs : bordure en pointillés à la couleur de la meilleure stat de l'équipier, pas de la zone.
return <span key={boost.cardId} data-missed={missed || undefined} style={missed ? { "--better": `var(--color-stat-${boost.bestStat})` } : undefined}>
<img src={imageOf(catalog, boost.cardId)} alt={name(boost.cardId)} title={missed ? fillTemplate(content.reviewBetterBadge, { value: `+${boost.bestValue}`, stat: statLabels[boost.bestStat] }) : name(boost.cardId)} />
<b>+{boost.value}</b>
</span>;
})}</span>
</li>;
})}</ol>
{/* Le circuit montre déjà chaque élan : on ne détaille que ceux qui valaient plus ailleurs, ou qui n'ont pas été donnés. */}
{missed.length > 0 && <>
<h4>{content.reviewNotesTitle}</h4>
<ul className="nebula-race-review-notes">{missed.map((boost) => <li key={boost.cardId}>
<img src={imageOf(catalog, boost.cardId)} alt="" style={{ "--better": `var(--color-stat-${boost.bestStat})` }} />
<p>{boost.stat
? fillParts(content.reviewNoteGiven, { card: <strong>{name(boost.cardId)}</strong>, zone: <ZoneName stat={boost.stat} statLabels={statLabels} />, value: <b>+{boost.value}</b> })
: fillParts(content.reviewNoteMissing, { card: <strong>{name(boost.cardId)}</strong> })}
{" "}{fillParts(content.reviewNoteBetter, { zone: <ZoneName stat={boost.bestStat} statLabels={statLabels} />, value: <b>+{boost.bestValue}</b> })}</p>
</li>)}</ul>
</>}
</section>;
}
export function RaceResult({ catalog, race, nextAt, content, teamContent, statLabels, titleRef }) {
const [now] = useState(() => Date.now());
const review = useMemo(() => raceReview(race), [race]);
const showBest = review.mine - review.best > NEAR_BEST_MS;
return <div className="nebula-race-outcome">
<section className="nds-panel nebula-race-result" aria-labelledby="nebula-race-result-title" data-place={race.place}>
<div className="nebula-race-result-head">
<span className="nebula-race-medal" aria-hidden="true">{race.place}<small>{race.place === 1 ? "re" : "e"}</small></span>
<div>
<h3 id="nebula-race-result-title" ref={titleRef} tabIndex={-1}>{placeText(race.place, content)}</h3>
<p className="nebula-race-reward">{race.reward > 0 ? <><CurrencyIcon kind="stardust" />{fillTemplate(content.earned, { reward: formatStardust(race.reward) })}</> : content.noReward}</p>
</div>
</div>
<RaceFinish catalog={catalog} race={race} review={review} showBest={showBest} content={content} teamContent={teamContent} />
<p className="nebula-race-next">{fillTemplate(content.next, { time: formatCountdown(nextAt - now) })}</p>
</section>
<RaceReview catalog={catalog} race={race} review={review} content={content} teamContent={teamContent} statLabels={statLabels} />
</div>;
}

View file

@ -48,7 +48,7 @@ function RaceToday({ race }) {
: <p className="nebula-form-help">Le parcours se tire à la première visite d’un joueur.</p>}
<dl className="nebula-admin-race-figures">
<div><dt>Places des joueurs</dt><dd>{race.places.map((count, index) => `${index + 1}${index ? "e" : "re"} : ${number(count)}`).join(" · ")}</dd></div>
<div><dt>Adversaires</dt><dd>{opponents ? `${number(race.opponents.players)} équipe${race.opponents.players > 1 ? "s" : ""} de joueurs · ${number(race.opponents.watchers)} des Veilleurs` : "Aucune course lancée."}</dd></div>
<div><dt>Adversaires</dt><dd>{opponents ? `${number(race.opponents.players)} équipe${race.opponents.players > 1 ? "s" : ""} de joueurs (dont ${number(race.opponents.ghosts)} avec leur vraie course) · ${number(race.opponents.watchers)} des Veilleurs` : "Aucune course lancée."}</dd></div>
</dl>
</section>;
}

View file

@ -105,6 +105,10 @@ export function recruitTeam(day) {
}
// Serveur de développement seulement.
export function resetRace() {
return request("/team/race/reset", { method: "POST" });
}
export function resetTeam() {
return request("/team/reset", { method: "POST" });
}

View file

@ -1,5 +1,6 @@
// Rôle : fait avancer une course à l'écran avec les règles du serveur (coureur du joueur, adversaires et leurs élans).
import { applyBoost, canBoost, startRun, STEP_MS, stepRun, zoneAt } from "../../../../services/cards/race-rules.js";
// Rôle : fait avancer une course à l'écran avec les règles du serveur (coureur du joueur, adversaires et leurs élans), et en fait
// le bilan une fois finie.
import { applyBoost, autoRun, bestBoosts, canBoost, placeOf, RACE_STATS, replayRun, startRun, STEP_MS, stepRun, zoneAt } from "../../../../services/cards/race-rules.js";
const entrant = ({ runner, helpers }) => ({ runner: runner.stats, helpers: helpers.map((helper) => helper.stats) });
@ -59,6 +60,47 @@ export function raceRanking(race) {
.map((entry, index) => ({ ...entry, index })).sort((left, right) => left.finishedAt - right.finishedAt || left.index - right.index);
}
// Bilan d'une course finie, pour apprendre sans être guidé pendant la course : temps sans élan, avec ceux du joueur et avec les
// meilleurs trouvés (et la place qu'ils auraient donnée) ; pour chaque équipier, la zone de son élan et sa meilleure stat ; un
// coureur nettement plus rapide dans l'équipe, s'il n'a pas couru.
const CLEARLY_FASTER_MS = 300;
export function raceReview(race) {
const runner = race.runner.stats;
const helpers = race.helpers.map((helper) => helper.stats);
const others = race.opponents.map((opponent) => opponent.finishedAt);
const replay = (boosts) => replayRun({ runner, helpers, boosts }, race.zones).finishedAt;
const mine = replay(race.boosts);
const best = Math.min(mine, replay(bestBoosts({ runner, helpers }, race.zones)));
// Zone de chaque élan donné, en rejouant la course.
const given = new Map();
const queue = [...race.boosts].sort((left, right) => left.at - right.at);
let run = startRun();
while (run.finishedAt === null) {
while (queue.length && queue[0].at <= run.time) {
const { helper } = queue.shift();
const next = applyBoost(run, helpers, race.zones, helper);
if (next !== run) given.set(helper, zoneAt(run.position));
run = next;
}
run = stepRun(run, runner, race.zones);
}
// Chaque compagnon comme coureur, avec des élans bien joués ; un autre n'est signalé que s'il gagne nettement.
const team = [runner, ...helpers];
const times = team.map((stats, index) => autoRun({ runner: stats, helpers: team.filter((_, other) => other !== index) }, race.zones, "skilled", () => 0).finishedAt);
const fastest = times.reduce((best, time, index) => (time < times[best] ? index : best), 0);
return {
plain: replay([]), mine, best, bestPlace: placeOf(best, others),
boosts: race.helpers.map((helper, index) => {
const bestStat = RACE_STATS.reduce((top, stat) => (helper.stats[stat] > helper.stats[top] ? stat : top), RACE_STATS[0]);
const zone = given.get(index) ?? null;
const stat = zone === null ? null : race.zones[zone];
return { cardId: helper.cardId, zone, stat, value: stat ? helper.stats[stat] : 0, bestStat, bestValue: helper.stats[bestStat] };
}),
fasterRunner: times[0] - times[fastest] > CLEARLY_FASTER_MS ? race.helpers[fastest - 1].cardId : null
};
}
// Nom d'un adversaire : son pseudo, une Équipe des Veilleurs ou un compte supprimé depuis.
export function racerName(entry, content) {
return entry.name || (entry.watchers ? content.watchers : content.deletedPlayer);