Remove card.rs #83
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This file is vestigial. card_to_id is frankenstein jank, all usages of the u32 output should be replaced with the upstream Card type.
Resolved in commit
e0a858d(branch refactor/strip-card_game-redundancies).card_to_id(the 0..=51 frankenstein id) is removed andcard.rsdeleted. Replacements:Carditself, not a precomputed id.RightClickRadialState.cards:Vec<u32>->Vec<Card>.CardSnapshot.id:u32->card_game::Card. Card is#[serde(transparent)]overNonZeroU8, so it still serialises as a plain JS number — the same opaque key the renderer already used (Map key /dataset.cardId; no arithmetic on it; faces render from rank+suit). A new test assertscard.idserialises as a JSON number.DebugInvariantReportdeck-completeness check: reworked from a[bool;52]index into aHashSet<Card>+Card::newreference deck; the out-of-range check is dropped (aCardis always valid).card.rsis gone: theCard/Deck/Rank/Suitre-exports moved to the crate root and the 69solitaire_core::card::import paths flattened tosolitaire_core::.cargo test --workspace(all crates green, incl. the wasm autonomous soak that exercises CardSnapshot + the invariant report) andclippy --workspace --all-targets -D warningsboth pass.