fix move count
This commit is contained in:
+1
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user