Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

Commit

Permalink
fixed many bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
HumanBot000 committed Dec 15, 2022
1 parent c5abf41 commit 980c3a5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def update_coins(coins):
settings_file = open("settings.txt", "r+").readlines()
os.remove("settings.txt")
f = open('settings.txt', 'a')
f.write(f"money:{coins}\n")
data = settings_file
data[0] = f"money:{coins}\n"
f.writelines(data)


def settings(coins):
Expand Down Expand Up @@ -120,6 +122,8 @@ def game_guess_the_number():
print(f"You only have {coins} coins")
print(Fore.RESET)
game_guess_the_number()
if coins <0:
game_guess_the_number()
except Exception:
print(Fore.RED)
print("Please enter a valid number")
Expand Down Expand Up @@ -271,6 +275,11 @@ def game_black_jack():
print(f"You only have {coins} coins")
print(Fore.RESET)
game_black_jack()
input()
if bet < 0:
print("please enter a valid number")
input()
game_black_jack()
except Exception:
print(Fore.RED)
print("Please enter a valid number")
Expand Down Expand Up @@ -366,6 +375,8 @@ def game_jackpot():
f"or end the game if you raise it you have a 40% chance to double the multiplier 0 -> 2 -> 4 -> ...\n"
f"If you are unlucky all your coins are away\n"
f"Note if you end with a x0 multiplier your coins are also gone")
input()
game_jackpot()
print(Fore.RESET)
elif task == 1:
print(Fore.YELLOW)
Expand Down
2 changes: 1 addition & 1 deletion settings.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
money:100
version:v2.0
version:v2.1

0 comments on commit 980c3a5

Please sign in to comment.