more double-down fixes

This commit is contained in:
Nick Pegg 2025-07-05 16:45:51 -07:00
parent 83aa05a611
commit 5b62addaaa
2 changed files with 23 additions and 9 deletions

View file

@ -173,14 +173,17 @@ impl Game {
// if player busts, immediately lose bet
if player_hand.value() > 21 {
return EndState::new(
PlayResult::Bust,
dealer_hand.cards(),
player_hand.cards(),
shuffled,
);
break;
}
}
if player_hand.value() > 21 {
return EndState::new(
PlayResult::Bust,
dealer_hand.cards(),
player_hand.cards(),
shuffled,
);
}
// Dealer turn
while dealer_hand.value() < 17 {