Remove external undo tracking #84

Closed
opened 2026-06-11 03:12:48 +00:00 by Quaternions · 1 comment

apply_undo_score in solitaire_core/src/klondike_adapter.rs is vestigial and should be removed. The penalty is configured in the upstream KlondikeConfig and tracked in SessionStats. No external tracking required.

apply_undo_score in solitaire_core/src/klondike_adapter.rs is vestigial and should be removed. The penalty is configured in the upstream KlondikeConfig and tracked in SessionStats. No external tracking required.
Owner

Resolved in commit 372b642 (branch refactor/strip-card_game-redundancies).

KlondikeAdapter::apply_undo_score and the whole score_for_* helper family are removed. The -15 undo penalty is now configured as SessionConfig::undo_penalty: -15 and applied by the upstream score formula (undos * undo_penalty), and SessionStats::undos() tracks the count — so no external undo tracking remains. GameState::undo() is now just the mode guards + session.undo().

Note: this required migrating Ferrous fully onto upstream scoring. The old adapter applied the penalty to a per-step-clamped, path-dependent score; upstream applies it as a linear correction term. The two are not numerically identical, so this is a deliberate scoring-behaviour change, not a pure no-op cleanup.

Resolved in commit 372b642 (branch refactor/strip-card_game-redundancies). `KlondikeAdapter::apply_undo_score` and the whole `score_for_*` helper family are removed. The -15 undo penalty is now configured as `SessionConfig::undo_penalty: -15` and applied by the upstream score formula (`undos * undo_penalty`), and `SessionStats::undos()` tracks the count — so no external undo tracking remains. `GameState::undo()` is now just the mode guards + `session.undo()`. Note: this required migrating Ferrous fully onto upstream scoring. The old adapter applied the penalty to a per-step-clamped, path-dependent score; upstream applies it as a linear correction term. The two are not numerically identical, so this is a deliberate scoring-behaviour change, not a pure no-op cleanup.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#84