refactor(core): delegate check_win to Session::is_win
check_win() manually projected through session.state().state().is_win(), reaching the inner Klondike's is_win. Session::is_win() (card_game 0.4.1) wraps that exact same projection, so collapse the three-hop reach into a single-hop delegation. check_auto_complete() keeps its projection because is_win_trivial() is a Klondike-only method with no Session wrapper. Behavior is bit-for-bit identical; the test-support override in is_won()/is_auto_completable() (which call check_win) is untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -969,7 +969,7 @@ impl GameState {
|
||||
|
||||
/// Returns `true` when all four foundation slots each contain a complete A→K sequence.
|
||||
pub fn check_win(&self) -> bool {
|
||||
self.session.state().state().is_win()
|
||||
self.session.is_win()
|
||||
}
|
||||
|
||||
/// Returns `true` when the game can be completed without further player input
|
||||
|
||||
Reference in New Issue
Block a user