end game when out of money
This commit is contained in:
parent
10d00c8ef5
commit
a2d1695203
1 changed files with 5 additions and 0 deletions
|
|
@ -71,6 +71,11 @@ fn interactive_play() {
|
|||
}
|
||||
|
||||
bank += result.player_winnings;
|
||||
|
||||
if bank == 0 {
|
||||
println!("You're out of money.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue