The first additions I added was an “if-elif” to check what kind of bet the player you want to make. If they pick a singular, then they pick ONE spot on the table to bet on and if they pick a group, they will select from a preset group selection. If they type an invalid bet group, it won’t continue until they do with a “while” loop
if "g" in betType.lower():
betType = "group"
else:
betType = "single"
if betType.lower() == "single":
betList.append(str(input("Between 000, 00, 0, and up to 36, what do you bet on? ")))
elif betType.lower() == "group":
group = str(input("What betting group are you thinking? (straight, red, black, odd, even, 1st, 2nd, or 3rd dozen): "))
if group in table:
betList = table[group]
else:
while group not in table:
if group not in table:
group = str(input("That is not a group of bets you can make: "))
I also changed how the rewards work so that the more slots you bet on at a time, the lower your rewards are, by subtracting the original multiplier by the length of the bet selection.
if result in betList:
yourMoney += betAmount * 35 - len(betList)
print("You win!")
I am currently working on a group of “setup” functions to customize some small things before the game starts, such as whether zero slots should be used:
#setup functions
def set_zeros():
if str(input("We using zeros on this wheel? (y/n): ")).lower() == "y":
return "yes"
else:
return "no"
def set_zero_amount(zeros):
if zeros.lower() == "yes":
#make a chain to ask how many zeros should be added to the wheel and table (if applicable)
#setup
zeros = set_zeros()
num_zeros = set_zero_amount(zeros)
The “zeros” variable will soon be used later with some logic to ensure that an error doesn’t happen when someone tries to bet on a zero when none are in play or when they pick a zero not in play.
Leave a Reply