feat(core): card/pile conversion utils and GameMode-aware scoring (steps 2-prep, 5)
Build and Deploy / build-and-push (push) Failing after 55s
Build and Deploy / build-and-push (push) Failing after 55s
Step 2 prep — card_game dep + type-conversion utilities: - Add card_game = "0.3.0" (registry Quaternions) to workspace + core - suit_to_kl / suit_from_kl, rank_to_kl / rank_from_kl - card_to_kl (drops id, Deck1), card_from_kl (reconstructs stable id from Clubs-first suit×13+rank ordering matching deck.rs) - Ready to wire into KlondikeState pile projection once upstream adds KlondikeState::from_piles() Step 5 — GameMode-aware scoring in the adapter: - score_for_move_with_mode, score_for_flip_with_mode (return 0 in Zen) - apply_undo_score (static, handles Zen + −15 penalty + clamp) - score_for_recycle_with_mode (return 0 in Zen) - game_state.rs: all inline GameMode::Zen checks replaced with adapter calls; adapter is now the single source of truth for "what score does this action give in this mode" 192 tests pass; clippy -D warnings clean. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,6 +38,7 @@ solitaire_sync = { path = "solitaire_sync" }
|
||||
solitaire_data = { path = "solitaire_data" }
|
||||
solitaire_engine = { path = "solitaire_engine" }
|
||||
klondike = { version = "0.2.0", registry = "Quaternions" }
|
||||
card_game = { version = "0.3.0", registry = "Quaternions" }
|
||||
|
||||
# Bevy with `default-features = false` to avoid the unused
|
||||
# `bevy_audio → rodio + symphonia + cpal 0.15 + alsa 0.9` chain.
|
||||
|
||||
Reference in New Issue
Block a user