CB-WP-0047: all four boards, and every mode named on the page
Some checks failed
ci / check (push) Failing after 3s
Some checks failed
ci / check (push) Failing after 3s
The modes were already implemented; nothing had ever COMPARED them. The scenarios were not implemented at all: edition::deal has taken a scenario_id since it was written and the only caller passed the literal "SCN_01", so 15 of 20 Problem cards had never been dealt by anything. The seam was the whole mechanism and it sat unused, with nothing red because nothing asked. Scenario is now state (serde default SCN_01, so all 26 recordings replay unchanged), selected by preset `scn-03-4p` with `standard-Np` still meaning SCN_01, and by --scenario/SCENARIO= accepting ids, numbers or titles, validated against the edition rather than a pattern. The threshold now comes off the Scenario card, closing F25's hardcoded 5/7/9. The first version of that control was worthless and mutation said so: all four scenarios print 5/7/9, so reverting to the bands left it green. Split threshold_from() so it can be handed a card that disagrees. The header read `scoring CommonProblem` where the Mode card is titled COMMON PROBLEM, PERSONAL EDGE -- the defect CB-WP-0034 deleted from the move buttons, still standing on the line that says what winning means. The coverage probe was matching that Debug output and went red when it was fixed: third instance (CB-WP-0024, CB-WP-0034). Page now carries the premise, the mode's rules text, and the tiebreak. scenario-panel plays 4x3x3. Findings: SCN_01 and SCN_02 are the same board (identical cells, pinned by a characterisation test); SCN_04 is the hard board at 2p (52% vs 67/73%, the only deck needing two Repair); and group success is EXACTLY equal across all three modes in all 36 cells, because greedy never reads state.mode -- filed F27, the two competitive modes are scoring lenses over cooperative play. F28: SHARED GROUND's mastery subtracts penalties from the claimed COUNT where the mode card's shared score is claimed VALUE. Raised, not fixed; scoring is ground-game's to rule on. Also fixes design.py reporting a backticked path as no reproduction. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
1d3f1bfe60
commit
d30938b259
19 changed files with 1351 additions and 109 deletions
|
|
@ -135,7 +135,12 @@ mod coverage {
|
|||
("round", "round 3"),
|
||||
("lead", "lead P2"),
|
||||
("step", "step Select"),
|
||||
("mode", "scoring BondedCoalitions"),
|
||||
// Was "scoring BondedCoalitions" — the Rust variant's name.
|
||||
// **The probe was certifying the defect**, and went red the
|
||||
// moment the defect was fixed. Third time this exact shape has
|
||||
// been found (CB-WP-0024, CB-WP-0034): a probe that names a
|
||||
// rendering holds that rendering in place, so probes name FACTS.
|
||||
("mode", "BONDED COALITIONS"),
|
||||
("viewer", "viewing as P1"),
|
||||
("solution_deck_len", "draw pile: 17 remaining"),
|
||||
("solution_discard.*.suit", "discard Repair Change"),
|
||||
|
|
@ -188,6 +193,11 @@ mod coverage {
|
|||
// OMITTED, and the page would be illegible to `text_of` and to a
|
||||
// screen reader alike.
|
||||
("variant", "ground-darvo-r0"),
|
||||
// The fixture plays SCN_03, so the token is that card's TITLE.
|
||||
// Not "SCN_03": a probe that matches an id would go green
|
||||
// against a page showing the id, which is the machine's name for
|
||||
// the board and not the player's (CB-WP-0034's finding).
|
||||
("scenario", "Decision Without Consent"),
|
||||
("problem_markers.*.owner", "P1\u{2019}s alone"),
|
||||
("problem_markers.*.scope", "P2\u{2019}s Bond network"),
|
||||
("outcome.total", "total 9"),
|
||||
|
|
@ -697,6 +707,79 @@ mod gamelog {
|
|||
}
|
||||
}
|
||||
|
||||
/// **The page names the Mode by its printed title** (CB-WP-0047).
|
||||
///
|
||||
/// The header read `scoring CommonProblem` — the Rust variant's
|
||||
/// name, where the Mode card is titled *"COMMON PROBLEM, PERSONAL
|
||||
/// EDGE"*. CB-WP-0034 deleted this exact defect from the move
|
||||
/// buttons and it was still standing on the one line that says what
|
||||
/// winning means.
|
||||
#[test]
|
||||
fn every_mode_is_named_and_explained_in_the_editions_words() {
|
||||
use games_ground::ScoringMode as M;
|
||||
for mode in [M::SharedGround, M::CommonProblem, M::BondedCoalitions] {
|
||||
let mut v = crate::testfix::view(Some(PlayerId(0)));
|
||||
v.mode = mode;
|
||||
let text = crate::text_of(&crate::doc::document(
|
||||
&v,
|
||||
&[],
|
||||
"/c",
|
||||
Some(PlayerId(0)),
|
||||
false,
|
||||
));
|
||||
assert!(
|
||||
!text.contains(&format!("{mode:?}")),
|
||||
"{mode:?}: the page shows the Rust variant's name"
|
||||
);
|
||||
let (card, _) = games_ground::edition::modes()
|
||||
.expect("Modes.csv")
|
||||
.into_iter()
|
||||
.find(|(c, _)| {
|
||||
c.id == match mode {
|
||||
M::SharedGround => "MODE_COOP",
|
||||
M::CommonProblem => "MODE_SEMI",
|
||||
M::BondedCoalitions => "MODE_COALITION",
|
||||
}
|
||||
})
|
||||
.expect("the mode card");
|
||||
assert!(
|
||||
text.contains(&card.title),
|
||||
"{mode:?}: the Mode card's title {:?} is not on the page",
|
||||
card.title
|
||||
);
|
||||
// **And what it MEANS.** Three modes define winning three
|
||||
// different ways and the page had never stated any of them.
|
||||
let head: String = card.rules_text.chars().take(50).collect();
|
||||
assert!(
|
||||
text.contains(&head),
|
||||
"{mode:?}: nothing on the page says how this game is won"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// **The page names which of the four boards this is** (CB-WP-0047).
|
||||
#[test]
|
||||
fn every_scenario_is_named_with_its_premise() {
|
||||
for s in games_ground::edition::scenarios().expect("Scenarios.csv") {
|
||||
let mut v = crate::testfix::view(Some(PlayerId(0)));
|
||||
v.scenario = s.id.clone();
|
||||
let text = crate::text_of(&crate::doc::document(
|
||||
&v,
|
||||
&[],
|
||||
"/c",
|
||||
Some(PlayerId(0)),
|
||||
false,
|
||||
));
|
||||
assert!(text.contains(&s.title), "{}: the board is unnamed", s.id);
|
||||
let head: String = s.premise.chars().take(50).collect();
|
||||
assert!(
|
||||
text.contains(&head),
|
||||
"{}: the page does not say what the table is arguing about",
|
||||
s.id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// **A scope says what it does** (CB-WP-0046).
|
||||
///
|
||||
/// CB-WP-0045 shipped the placement and recorded the gap with the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue