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

Commit

Permalink
Added gtn
Browse files Browse the repository at this point in the history
  • Loading branch information
HumanBot000 committed Dec 1, 2022
1 parent 23bd60d commit c1ccf76
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 4 deletions.
159 changes: 156 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import random
import re
import time

from colorama import Fore

Expand Down Expand Up @@ -62,6 +61,160 @@ def settings(coins):
print(Fore.RESET)
settings(coins)

def validate_int(int):
try:
int = int(int)
except Exception:
return False
else:
return True
def game_guess_the_number():
clear_console()
print(Fore.RESET)
print(Fore.CYAN)
try:
game = int(input("Please select a Task: [0] Rules | [1] Play | [2] Back:"))
except Exception:
print(Fore.RED)
print("Please enter a valid number")
game_guess_the_number()
if game == 1:
coins = get_coins()
print(Fore.YELLOW)
try:
bet = int(input("How much do you bet?:"))
if coins < bet:
print(Fore.RED)
print(f"You only have {coins} coins")
print(Fore.RESET)
game_guess_the_number()
except Exception:
print(Fore.RED)
print("Please enter a valid number")
game_guess_the_number()
try:
print(Fore.BLUE)
mode = int(input("Which range do you choose? [0] 0-10 (5x) | [1] 0-100(x50) | [2] 0-1000(x750):"))
print(Fore.RESET)
except Exception:
print(Fore.RED)
print("Please enter a valid number")
game_guess_the_number()
coins = coins - bet
if mode == 0:
clear_console()
print(Fore.CYAN)
while True:
try:
print(Fore.CYAN)
number_user = int(input("Please enter a number between 0 and 10:"))
if not number_user <= 10:
print(Fore.RED)
print("Please enter a valid number")
print(Fore.RESET)
else:
break
except Exception:
print(Fore.RED)
print("Please enter a valid number")
print(Fore.RESET)
number_bot = random.randint(0, 10)
if number_user == number_bot:
print(Fore.GREEN)
print("You Won your coins will be multiply by x5")
print(Fore.RESET)
coins_to_give = bet * 5
coins = coins + coins_to_give
update_coins(coins)
input()
game_guess_the_number()
else:
print(Fore.RED)
print(f"You lose the bot had {number_bot} all your coins are gone")
print(Fore.RESET)
update_coins(coins)
input()
game_guess_the_number()
elif mode == 1:
clear_console()
print(Fore.CYAN)
while True:
try:
print(Fore.CYAN)
number_user = int(input("Please enter a number between 0 and 100:"))
if not number_user <= 100:
print(Fore.RED)
print("Please enter a valid number")
print(Fore.RESET)
else:
break
except Exception:
print(Fore.RED)
print("Please enter a valid number")
print(Fore.RESET)
number_bot = random.randint(0, 100)
if number_user == number_bot:
print(Fore.GREEN)
print("You Won your coins will be multiply by x50")
print(Fore.RESET)
coins_to_give = bet * 50
coins = coins + coins_to_give
update_coins(coins)
input()
game_guess_the_number()
else:
print(Fore.RED)
print(f"You lose the bot had {number_bot} all your coins are gone")
print(Fore.RESET)
update_coins(coins)
input()
game_guess_the_number()
elif mode == 2:
clear_console()
print(Fore.CYAN)
while True:
try:
print(Fore.CYAN)
number_user = int(input("Please enter a number between 0 and 1000:"))
if not number_user <= 1000:
print(Fore.RED)
print("Please enter a valid number")
print(Fore.RESET)
else:
break
except Exception:
print(Fore.RED)
print("Please enter a valid number")
print(Fore.RESET)
number_bot = random.randint(0, 1000)
if number_user == number_bot:
print(Fore.GREEN)
print("You Won your coins will be multiply by x750")
print(Fore.RESET)
coins_to_give = bet * 750
coins = coins + coins_to_give
update_coins(coins)
input()
game_guess_the_number()
else:
print(Fore.RED)
print(f"You lose the bot had {number_bot} all your coins are gone")
print(Fore.RESET)
update_coins(coins)
input()
game_guess_the_number()
else:
game_guess_the_number()
if game == 0:
print(Fore.GREEN)
# TODO rules
print("")
input()
print(Fore.RESET)
game_black_jack()
if game == 2:
get_game()


def game_black_jack():
clear_console()
Expand Down Expand Up @@ -102,7 +255,7 @@ def game_black_jack():
dealer_amount = 19
while True:
probability = random.randint(1, 100)
if probability <=70 and probability >0: #70 Prozent
if probability <= 70 and probability > 0: # 70 %
dealer_amount = dealer_amount - 1
else:
break
Expand Down Expand Up @@ -167,7 +320,7 @@ def get_game():
print("Please enter a valid number")
get_game()
if game == 0:
pass
game_guess_the_number()
if game == 1:
game_black_jack()
if game == 2:
Expand Down
2 changes: 1 addition & 1 deletion settings.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
money:176
money:100

0 comments on commit c1ccf76

Please sign in to comment.