Add comments for areas of improvement to textslot
This commit is contained in:
parent
6ff5a6fb23
commit
215565451f
|
@ -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).")
|
||||
|
|
Loading…
Reference in New Issue
Block a user