Proper score

This commit is contained in:
Kalle
2026-08-05 17:18:41 +03:00
parent d1cf38fabe
commit aefe99a204
47 changed files with 582 additions and 230 deletions

View File

@@ -103,7 +103,6 @@ for (const config of configs) {
header: { ok: 0, total: 0 } as Tally,
timestamp: { ok: 0, total: 0 } as Tally,
replayCode: { ok: 0, total: 0 } as Tally,
scores: { ok: 0, total: 0 } as Tally,
matchScores: { ok: 0, total: 0 } as Tally,
weapons: { ok: 0, total: 0 } as Tally,
names: { ok: 0, total: 0 } as Tally,
@@ -144,11 +143,6 @@ for (const config of configs) {
tally.replayCode.total++;
if (event.data.replayCode === expected.replayCode) tally.replayCode.ok++;
}
if (expected.scores) {
tally.scores.total++;
if (JSON.stringify(event.data.scores) === JSON.stringify(expected.scores))
tally.scores.ok++;
}
if (expected.matchScores) {
tally.matchScores.total++;
if (
@@ -200,10 +194,7 @@ for (const config of configs) {
console.info(`timestamp ${pct(tally.timestamp)}`);
console.info(`replayCode ${pct(tally.replayCode)}`);
}
console.info(`scores ${pct(tally.scores)}`);
if (config.event === "ScoreboardReplay") {
console.info(`matchScores ${pct(tally.matchScores)}`);
}
console.info(`matchScores ${pct(tally.matchScores)}`);
console.info(`weapons ${pct(tally.weapons)}`);
console.info(`names ${pct(tally.names)}`);
console.info(`paint ${pct(tally.paint)}`);

View File

@@ -35,7 +35,7 @@ for (const fixture of fixtures) {
console.info(`gate: pass=${gate.pass} score=${gate.score.toFixed(3)}`);
for (const event of events) {
console.info(`event confidence=${event.confidence.toFixed(3)}`);
console.info(`scores: ${JSON.stringify(event.data.scores)}`);
console.info(`matchScores: ${JSON.stringify(event.data.matchScores)}`);
const rows = (event.debug?.rows ?? []) as ScoreboardRowDebug[];
event.data.players.forEach((p, i) => {
const dbg = rows[i];