From 74343d0c7a191a63076128c494869da0954ac152 Mon Sep 17 00:00:00 2001 From: Rhys Lloyd Date: Sun, 17 May 2026 09:42:47 -0700 Subject: [PATCH] fix move count --- klondike/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/klondike/src/lib.rs b/klondike/src/lib.rs index c5176a9..b3e7d0a 100644 --- a/klondike/src/lib.rs +++ b/klondike/src/lib.rs @@ -594,6 +594,7 @@ impl Game for Klondike { config: &Self::Config, instruction: Self::Instruction, ) { + stats.increment_moves(); match instruction { // Reset the stock if it's empty KlondikeInstruction::RotateStock => { @@ -608,13 +609,11 @@ impl Game for Klondike { } // Move a card from anywhere to a foundation KlondikeInstruction::DstFoundation(DstFoundation { src, foundation }) => { - stats.increment_moves(); let card = self.state.take_top_card(src); self.state.extend_foundation(foundation, card); } // Move a stack of cards from anywhere to a tableau KlondikeInstruction::DstTableau(DstTableau { src, tableau }) => { - stats.increment_moves(); let cards = self.state.take_stack(src); self.state.extend_tableau(tableau, cards); }