Made other minor improvements
This commit is contained in:
parent
6443de9841
commit
a997ef707b
@ -292,7 +292,6 @@ def build_a_list_of_wager_types():
|
|||||||
selected_key = input("Enter a wager type (e.g. S3): ").strip().upper()
|
selected_key = input("Enter a wager type (e.g. S3): ").strip().upper()
|
||||||
if selected_key not in globals():
|
if selected_key not in globals():
|
||||||
print(f"'{selected_key}' is not defined.")
|
print(f"'{selected_key}' is not defined.")
|
||||||
selected_key = input("Please enter a wager type to continue. ")
|
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
wager_dict = globals()[selected_key]
|
wager_dict = globals()[selected_key]
|
||||||
@ -465,14 +464,21 @@ def keep_playing():
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
holdings = int(input("Enter your initial holdings at the start of play (e.g. 1000 for $1000): "))
|
holdings = input("Enter your initial holdings at the start of play (e.g. 1000 for $1000): ")
|
||||||
global playing
|
if not is_convertible_to_int(holdings):
|
||||||
global DEBUG
|
print("You must enter an integer for your holdings.")
|
||||||
global wagers
|
holdings = None
|
||||||
|
main()
|
||||||
|
else:
|
||||||
|
holdings = int(holdings)
|
||||||
|
global playing
|
||||||
|
global DEBUG
|
||||||
|
global wagers
|
||||||
|
|
||||||
while playing:
|
while playing:
|
||||||
|
|
||||||
display_board()
|
display_board()
|
||||||
|
print(f"Your holdings before the spin is ${holdings}")
|
||||||
# User selects which dictionaries to search for number the wheel returns
|
# User selects which dictionaries to search for number the wheel returns
|
||||||
wager_type_list = build_a_list_of_wager_types()
|
wager_type_list = build_a_list_of_wager_types()
|
||||||
number = spin_wheel()
|
number = spin_wheel()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user