refactor(core): card_game redundancy cleanup + derive scoring from upstream stats #88
Reference in New Issue
Block a user
Delete Branch "refactor/strip-card_game-redundancies"
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?
Summary
This branch carries two related strands of the
card_game/klondikemigration:GameState/klondike_adapteris load-bearing boundary code).GameState's hand-rolled WXP scoring state is replaced by values derived from the upstream session stats. This became possible after upstreamcard_game 0.4.1/klondike 0.4.0, which now trackundosandrecycle_countand defaultundo_penaltyto −15.Changes
Redundancy cleanup
GameState::compute_time_bonus(zero callers; engine uses theklondike_adapterfree fn)load_latest_replay_from/save_latest_replay_to(no callers outsidereplay.rs); keeplatest_replay_path(engine legacy migration uses it)XpBreakdownso the win-summary modal andxp_for_winshare one source of truthfeedback_anim_plugin's privatefoundation_from_slotcopy with the canonicalklondike_adapter::foundation_from_slotScoring migration — commit
372b642(closes #84, #86, #87)GameStatefieldsscore,undo_count,recycle_countscore_history+is_recycle_historyundo journalKlondikeAdapter::apply_undo_score, thescore_for_*helpers, andpre_instruction_score_delta/will_flip_tableau_sourcescore()/undo_count()/recycle_count()readingsession.stats(); the −15 undo penalty is nowSessionConfig::undo_penalty, applied by the upstream score formulaIntentional behavior changes: the escalating recycle penalty and per-step score floor are gone (upstream linear scoring, floored once at 0);
recycle_countis now cumulative (upstream does not roll it back on undo);undo_countresets across save/load (only the forward history is persisted).Verification
cargo test --workspace(core 52, data 134, engine 897, + others — all green) andcargo clippy --workspace --all-targets -- -D warningsclean.🤖 Generated with Claude Code
refactor: remove leftover redundancies after card_game migrationto refactor(core): card_game redundancy cleanup + derive scoring from upstream statsView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.