double down tweaks
This commit is contained in:
parent
498586344c
commit
83aa05a611
2 changed files with 26 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue