So here is my code:
if "Two" in comp1_cards_1 and "Two" in comp1_cards_2 or "Three" in comp1_cards_1 and "Three" in comp1_cards_2:
if comp_money1 < 500000:
pass
bet = [100, 150, 200]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Four" in comp1_cards_1 and "Four" in comp1_cards_2 or "Five" in comp1_cards_1 and "Five" in comp1_cards_2:
if comp_money1 < 500000:
pass
bet = [150, 200, 250]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Six" in comp1_cards_1 and "Six" in comp1_cards_2 or "Seven" in comp1_cards_1 and "Seven" in comp1_cards_2:
if comp_money1 < 500000:
pass
bet = [200, 250, 300]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Eight" in comp1_cards_1 and "Eight" in comp1_cards_2 or "Nine" in comp1_cards_1 and "Nine" in comp1_cards_2:
if comp_money1 < 500000:
pass
bet = [250, 300, 350]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Ten" in comp1_cards_1 and "Ten" in comp1_cards_2:
if comp_money1 < 500000:
pass
bet = [300, 350, 400]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Jack" in comp1_cards_1 and "Jack" in comp1_cards_2:
if comp_money1 < 500000:
pass
bet = [350, 400, 450]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Queen" in comp1_cards_1 and "Queen" in comp1_cards_2:
if comp_money1 < 500000:
pass
bet = [400, 450, 500]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "King" in comp1_cards_1 and "King" in comp1_cards_2:
if comp_money1 < 500000:
pass
bet = [450, 500, 550]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Ace" in comp1_cards_1 and "Ace" in comp1_cards_2:
if comp_money1 < 500000:
pass
bet = [600, 700, 750]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Two" in comp1_cards_1 or "Two" in comp1_cards_2 and "Two" in table1 or "Two" in table2 or "Two" in table3:
if comp_money1 < 500000:
pass
bet = [100, 150, 200]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Three" in comp1_cards_1 or "Three" in comp1_cards_2 and "Three" in table1 or "Three" in table2 or "Three" in table3:
if comp_money1 < 500000:
pass
bet = [100, 150, 200]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Four" in comp1_cards_1 or "Four" in comp1_cards_2 and "Four" in table1 or "Four" in table2 or "Four" in table3:
if comp_money1 < 500000:
pass
bet = [150, 200, 250]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Five" in comp1_cards_1 or "Five" in comp1_cards_2 and "Five" in table1 or "Five" in table2 or "Five" in table3:
if comp_money1 < 500000:
pass
bet = [150, 200, 250]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Six" in comp1_cards_1 or "Six" in comp1_cards_2 and "Six" in table1 or "Six" in table2 or "Six" in table3:
if comp_money1 < 500000:
pass
bet = [200, 250, 300]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Seven" in comp1_cards_1 or "Seven" in comp1_cards_2 and "Seven" in table1 or "Seven" in table2 or "Seven" in table3:
if comp_money1 < 500000:
pass
bet = [200, 250, 300]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Eight" in comp1_cards_1 or "Eight" in comp1_cards_2 and "Eight" in table1 or "Eight" in table2 or "Eight" in table3:
if comp_money1 < 500000:
pass
bet = [250, 300, 350]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Nine" in comp1_cards_1 or "Nine" in comp1_cards_2 and "Nine" in table1 or "Nine" in table2 or "Nine" in table3:
if comp_money1 < 500000:
pass
bet = [250, 300, 350]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Ten" in comp1_cards_1 or "Ten" in comp1_cards_2 and "Ten" in table1 or "Ten" in table2 or "Ten" in table3:
if comp_money1 < 500000:
pass
bet = [300, 350, 400]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Jack" in comp1_cards_1 or "Jack" in comp1_cards_2 and "Jack" in table1 or "Jack" in table2 or "Jack" in table3:
if comp_money1 < 500000:
pass
bet = [350, 400, 450]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Queen" in comp1_cards_1 or "Queen" in comp1_cards_2 and "Queen" in table1 or "Queen" in table2 or "Queen" in table3:
if comp_money1 < 500000:
pass
bet = [400, 450, 500]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "King" in comp1_cards_1 or "King" in comp1_cards_2 and "King" in table1 or "King" in table2 or "King" in table3:
if comp_money1 < 500000:
pass
bet = [450, 500, 550]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
if "Ace" in comp1_cards_1 or "Ace" in comp1_cards_2 and "Ace" in table1 or "Ace" in table2 or "Ace" in table3:
if comp_money1 < 500000:
pass
bet = [550, 650, 700]
comp_money1 = comp_money1 - c(bet)
jackpot = jackpot + abs(comp_money1 - 500000)
print("" + comp_1_name + ": I bet " + str(abs(comp_money1 - 500000)) + " dollars.")
else:
if comp_money1 < 500000:
pass
print("" + comp_1_name + ": I check.")
jackpot = jackpot + abs(comp_money1 - 500000)
Here is usually my outcome:
Ryan: I bet 350 dollars.
Ryan: I bet 900 dollars.
So basically what I need is the conditional to stop once it meets a true
. The problem is that the code doesn't stop, even though the computer has already "betted" for that round. I've googled, tried so many different solutions (that aren't solutions anyway) and I'm getting no where.
If anyone could help with this, that'd be great! (no meme references!)
Aucun commentaire:
Enregistrer un commentaire