Erster Entwurf Upgrade menu (Mit Folke zusammen)
This commit is contained in:
14
Game/game.py
14
Game/game.py
@@ -4,17 +4,17 @@ import random
|
||||
propability = 40
|
||||
coins_per_head = 0.5
|
||||
coins = 5
|
||||
coins_amount = 1
|
||||
heads_amount = 1
|
||||
multiplier = 0.5
|
||||
|
||||
def coin_flip(propability, coins, coins_per_head, coins_amount, multiplier):
|
||||
def coin_flip(propability, coins, coins_per_head, heads_amount, multiplier):
|
||||
while True:
|
||||
result = random.randint(0, 100)
|
||||
if result in range(0,propability):
|
||||
print(f'Kopf ({coins_amount}x)')
|
||||
coins_amount += 1 #Anzahl an hintereinander geworfenen "Köpfen"
|
||||
if coins_amount >=3:
|
||||
coins_per_head += multiplier #Coin-Boost für mehrfaches werfen von Kopf hintereinander
|
||||
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
|
||||
else:
|
||||
coins_per_head = 0.5
|
||||
coins += coins_per_head
|
||||
@@ -27,5 +27,5 @@ def coin_flip(propability, coins, coins_per_head, coins_amount, multiplier):
|
||||
input()
|
||||
|
||||
|
||||
coin_flip(propability, coins, coins_per_head, coins_amount, multiplier)
|
||||
coin_flip(propability, coins, coins_per_head, heads_amount, multiplier)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user