double down tweaks

This commit is contained in:
Nick Pegg 2025-07-05 11:31:27 -07:00
parent 498586344c
commit 83aa05a611
2 changed files with 26 additions and 9 deletions

View file

@ -156,6 +156,11 @@ impl Game {
player_hand.push(self.deal());
}
PlayerChoice::DoubleDown => {
if player_hand.cards().len() >= 3 {
// Can only double-down as first move
// TODO: Provide feedback that this move is invalid
continue;
}
if *money_on_table >= bet_amount {
*money_on_table -= bet_amount;
bet_amount *= 2;