diff --git a/PyGame/practice/textslot.py b/PyGame/practice/textslot.py index 9b26666..4db0e2f 100644 --- a/PyGame/practice/textslot.py +++ b/PyGame/practice/textslot.py @@ -125,10 +125,15 @@ def roll(balance) -> int: else: balance -= bet * lines print(f"Your balance is now: ${balance}") + # Should be returning "balance" + # "winnings - total_bet" is not at all correct return winnings - total_bet +# main() does not return a value so should not be type hinted def main() -> int: balance = deposit() + # Using "while True" requires a break to exit. + # Should instead be a conditional that tracks the actual exit conditions while True: print(f"Current Balance is ${balance}") answer = input("Press enter to play (q to quit).")