From 8df263e27e5249a119d63ea0d3a1834c97cdc49b Mon Sep 17 00:00:00 2001 From: Edward Davis Date: Sat, 31 Dec 2022 12:21:02 -0600 Subject: [PATCH] modified: main.py - added option when player is out of money --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index e6e412c..ee7ae44 100644 --- a/main.py +++ b/main.py @@ -146,6 +146,12 @@ def main(): if answer == "q": break balance += spin(balance) + if balance == 0: + print("You are out of money. Please deposit more to continue playing.") + answer = input("Press enter to make another deposit. (q to quit)") + if answer == "q": + break + balance = deposit() print(f"You left with ${balance}")