Bilan du match : page, courbe des chances de gagner le match, listes et accès
Page #/matchs/<id>/bilan (en-tête, courbe continue lue au doigt, partie par partie, jeu, videau, moment décisif, décision à revoir, export SGF, prompt). Un match tient en une ligne dans Mes parties et la progression ; le bilan et l'analyse d'une partie de match y renvoient. Test navigateur d'un match en 5 points remonté de 0–4. ADR 0007 et 0013 amendés, plan clos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
68664dc3f7
commit
3b0107af1b
@@ -399,3 +399,22 @@ test("le prompt « Bilan de mon match » cite le videau en chances de gagner le
|
||||
assert.match(prompt, /partie 4, coup 1\) : la position avant ma décision/);
|
||||
assert.equal(position.positionId, "wN1tAwADAAAAAA");
|
||||
});
|
||||
|
||||
test("une décision de videau dont la perte s'écrirait 0,0 % n'est pas listée", () => {
|
||||
const fourth = comeback[3] as MatchGame;
|
||||
const review = fourth.journal.review;
|
||||
assert.ok(review?.matchLosses !== undefined);
|
||||
const tiny = Object.fromEntries(Object.keys(review.matchLosses).map((id) => [id, -0.0004]));
|
||||
const games = comeback.map((g, i) =>
|
||||
i === 3 ? { ...g, journal: { ...g.journal, review: { ...review, matchLosses: tiny } } } : g,
|
||||
);
|
||||
const match = groupMatches(games).matches[0];
|
||||
assert.ok(match !== undefined);
|
||||
const summary = summarizeMatch(match);
|
||||
assert.equal(summary.cubeErrors.length, 0);
|
||||
assert.equal(summary.cubeDecisions, 1);
|
||||
assert.equal(
|
||||
matchCubeSentence(phrases, summary.cubeDecisions, 0),
|
||||
"Une seule décision de videau, comme je l'aurais prise.",
|
||||
);
|
||||
});
|
||||
|
||||
@@ -49,6 +49,9 @@ const TABLE: [string, Route][] = [
|
||||
// La progression (étape 1h) et son prompt « Créer des exercices ».
|
||||
["#/progression", { screen: "progression" }],
|
||||
["#/progression/ia", { screen: "progression", ai: true }],
|
||||
// Le bilan d'un match entier (étape 1l) et son prompt.
|
||||
["#/matchs/mh3k2-a1b2c3/bilan", { screen: "matchSummary", match: "mh3k2-a1b2c3" }],
|
||||
["#/matchs/mh3k2-a1b2c3/bilan/ia", { screen: "matchSummary", match: "mh3k2-a1b2c3", ai: true }],
|
||||
["#/menu", { screen: "menu" }],
|
||||
["#/nouvelle-partie", { screen: "newGame" }],
|
||||
["#/explication/12", { screen: "explanation", event: "12" }],
|
||||
@@ -131,6 +134,11 @@ test("une adresse inconnue est reconnue comme telle", () => {
|
||||
"#/parties/ab/ia",
|
||||
"#/explication/12/ia/ia",
|
||||
"#/progression/x",
|
||||
"#/matchs",
|
||||
"#/matchs/m1",
|
||||
"#/matchs/M1/bilan",
|
||||
"#/matchs/m1/bilan/x",
|
||||
"#/matchs/m1/analyse",
|
||||
"#/progression/ia/ia",
|
||||
]) {
|
||||
assert.equal(parseRoute(hash).screen, "unknown", hash);
|
||||
|
||||
Reference in New Issue
Block a user