CB-WP-0043: a Problem sits where its Stress lands
Some checks failed
ci / check (push) Failing after 4s
Some checks failed
ci / check (push) Failing after 4s
The picture had become a lie. A row across the middle says "these are the table's" — true under the baseline, false under H2, where three of five cards fall on particular seats. Global goes to the middle, personal beside its owner, and bond on the mean midpoint of the owner's Bond edges. A bond Problem whose owner has no Bond is drawn as personal, because that is the rule — bond_network falls back to the owner at degree 0 — and the picture must agree with the arithmetic. The baseline page is untouched: the scoped layout is taken only when a non-global scope exists, so every prior look at the baseline still holds. The scope reaches the view as a separate marker rather than a field on ProblemView, because the delta says "place owner marker on the card" — a token beside a card — and it is public while the card is face down, which a ProblemView variant could not express. The coverage probe forced a real improvement. It demanded a text token for the new fields and a POSITION is not a token — which is the probe being right: position alone is invisible to text_of and to a screen reader, and illegible when two anchors coincide. So each scoped Problem now says whose it is: everyone's, P1's alone, P2's Bond network, and "P1's alone — no Bond to share it" at degree 0. The fixture gained a third Problem. With two, one of the three placement rules was unexercised and the probe unsatisfiable — a fixture that cannot reach a branch is how a rule ships untested. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
47e7941057
commit
3174c5507a
6 changed files with 373 additions and 12 deletions
|
|
@ -44,6 +44,9 @@ pub struct GroundView {
|
|||
pub players: BTreeMap<PlayerId, PlayerView>,
|
||||
pub relations: BTreeMap<Pair, Relation>,
|
||||
pub problems: BTreeMap<u32, ProblemView>,
|
||||
/// H2: who each Problem's Stress falls on. Empty under the baseline.
|
||||
#[serde(default)]
|
||||
pub problem_markers: BTreeMap<u32, ProblemMarker>,
|
||||
pub focus: BTreeMap<PlayerId, PlayerId>,
|
||||
/// GR-R02: `Hidden` for other seats until Reveal.
|
||||
pub selections: BTreeMap<PlayerId, SelectionView>,
|
||||
|
|
@ -86,6 +89,18 @@ pub enum ProblemView {
|
|||
},
|
||||
}
|
||||
|
||||
/// H2's owner marker and scope, for one Problem (CB-WP-0043).
|
||||
///
|
||||
/// **Separate from `ProblemView`, because it is a separate component.**
|
||||
/// The delta says *"place owner marker on the card"* — a token beside a
|
||||
/// card, not part of it — and it is **public even while the card is face
|
||||
/// down**, which a variant of `ProblemView` could not express.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct ProblemMarker {
|
||||
pub owner: Option<PlayerId>,
|
||||
pub scope: Option<crate::edition::StressScope>,
|
||||
}
|
||||
|
||||
/// GR-R02/R04: face-down means face-down, including to the projection.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(tag = "state")]
|
||||
|
|
@ -176,6 +191,21 @@ impl Project for GroundState {
|
|||
.collect(),
|
||||
relations: self.relations.clone(),
|
||||
problems: self.problems.iter().map(|(k, p)| (*k, p.into())).collect(),
|
||||
// Public regardless of the card's face: at a table the owner
|
||||
// marker sits beside it where everyone can see.
|
||||
problem_markers: self
|
||||
.problems
|
||||
.iter()
|
||||
.map(|(k, p)| {
|
||||
(
|
||||
*k,
|
||||
ProblemMarker {
|
||||
owner: p.owner,
|
||||
scope: p.scope,
|
||||
},
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
focus: self.focus.clone(),
|
||||
selections: self
|
||||
.selections
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue