From 7ef02bf6f464f2b04a748549821ca02159d68deb Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Sat, 1 Jun 2024 22:25:06 -0500 Subject: [PATCH] Finish up betting code --- game.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/game.py b/game.py index 20ee777..861afa9 100644 --- a/game.py +++ b/game.py @@ -232,5 +232,18 @@ E. Exit""") # And this is the end of the old code docs... (basically, this part is modified however) if winnings == 0: print("You won nothing. (You kept your bet though)") - if winnings == (0 - (int(bet) * 10)): + elif winnings == (0 - (int(bet) * 10)): print("You lost your bet!") + uData["studsLost"] -= winnings + elif winnings >= 0: + print(f"You won {winnings} studs!") + uData["studsGained"] += winnings + elif winnings <= 0: + print(f"You lost {winnings} studs!") + uData["studsLost"] -= winnings + else: + print("wtf") + if uData["studs"] > uData["highestStuds"]: + uData["highestStuds"] = uData["studs"] + else: + print("You don't have enough studs to bet that much.")