Auswahl für Upgrades + Kaufsystem (mit Linus)

This commit is contained in:
2025-12-15 15:53:21 +01:00
parent 622cf1dd45
commit aca8e99ee8
5 changed files with 43 additions and 18 deletions

View File

@@ -3,29 +3,29 @@ import random
propability = 40
coins_per_head = 0.5
coins = 5
#wealth = 5000
heads_amount = 1
multiplier = 0.5
def coin_flip(propability, coins, coins_per_head, heads_amount, multiplier):
def coin_flip(propability, wealth, coins_per_head, heads_amount, multiplier):
while True:
result = random.randint(0, 100)
if result in range(0,propability):
print(f'Kopf ({heads_amount}x)')
heads_amount += 1 #Anzahl an hintereinander geworfenen "Köpfen"
if heads_amount >=3:
heads_per_head += multiplier #Coin-Boost für mehrfaches werfen von Kopf hintereinander
coins_per_head += multiplier #Coin-Boost für mehrfaches werfen von Kopf hintereinander
else:
coins_per_head = 0.5
coins += coins_per_head
wealth += coins_per_head
print('')
print(f'Du hast {coins} Coins (+ {coins_per_head})')
print(f'Du hast {wealth} Coins (+ {coins_per_head})')
input()
elif result in range(propability,100):
print('Zahl')
coins_amount = 1
heads_amount = 1
input()
coin_flip(propability, coins, coins_per_head, heads_amount, multiplier)
coin_flip(propability, wealth, coins_per_head, heads_amount, multiplier)