Kleine Aenderungen und Entwurf der Upgrades. Fehlt noch: Implementieren der Upgrades, speichern des Levels, Upgrade Menu. Falls moeglich waere es sehr gut die Dateien miteinander zu verknuepfen. Falls es nicht geht: Zusammenfuegen aller Dateien zu einem ganzen Spiel

This commit is contained in:
2025-12-14 17:50:55 +01:00
parent ac721887da
commit 652f25467f
4 changed files with 86 additions and 27 deletions

View File

@@ -1,31 +1,32 @@
#import menu
import menu
import random
if menu.b == 2:
propability = 40
coins_per_head = 0.5
coins = 5
coins_amount = 1
multiplier = 0.5
propability = 40
coins_per_head = 0.5
coins = 5
coins_amount = 1
multiplier = 0.5
def coin_flip(propability, coins, coins_per_head, coins_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
else:
coins_per_head = 0.5
coins += coins_per_head
print('')
print(f'Du hast {coins} Coins (+ {coins_per_head})')
input()
elif result in range(propability,100):
print('Zahl')
coins_amount = 1
input()
def coin_flip(propability, coins, coins_per_head, coins_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
else:
coins_per_head = 0.5
coins += coins_per_head
print('')
print(f'Du hast {coins} Coins (+ {coins_per_head})')
input()
elif result in range(propability,100):
print('Zahl')
coins_amount = 1
input()
coin_flip(propability, coins, coins_per_head, coins_amount, multiplier)
coin_flip(propability, coins, coins_per_head, coins_amount, multiplier)