feat(core): add klondike v0.2.0 dep and KlondikeAdapter (integration steps 1, 3, 4)
Build and Deploy / build-and-push (push) Failing after 1m0s
Build and Deploy / build-and-push (push) Failing after 1m0s
Step 1 — Cargo & registry: - Add .cargo/config.toml with Quaternions sparse registry (https://git.aleshym.co/api/packages/Quaternions/cargo/) - Add klondike = "0.2.0" to workspace deps (+ card_game v0.3.0, arrayvec v0.7.6 as transitives via the Quaternions registry) - Add klondike as a solitaire_core dep Step 3 — KlondikeConfig / MoveFromFoundationConfig: - KlondikeAdapter::new(draw_mode, take_from_foundation) builds a KlondikeConfig with the correct DrawStockConfig and MoveFromFoundationConfig (Allowed/Disallowed); exposes it via klondike_config() for future solver and pile-mapping steps Step 4 — Scoring via ScoringConfig: - GameState.adapter (serde(skip)) owns the authoritative KlondikeConfig with ScoringConfig::DEFAULT (WXP values) - score_for_move/flip/undo/recycle replace direct scoring.rs calls; scoring.rs retained for reference and future deletion - score_for_recycle implements the WXP free-recycle allowance rule that ScoringConfig::recycle cannot express (flat delta) - PartialEq/Eq for KlondikeAdapter compare draw_stock and move_from_foundation only (scoring is always DEFAULT) All 192 solitaire_core tests pass; clippy -D warnings clean. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,3 +8,4 @@ edition.workspace = true
|
||||
serde = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
klondike = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user