Ganz Rudimentaerer Entwurf der Grundmechanik des Spiels

This commit is contained in:
2025-12-03 20:30:58 +01:00
parent 7c1bfa1645
commit ff42ee7dee
2 changed files with 22 additions and 0 deletions

22
Game/game.py Normal file
View File

@@ -0,0 +1,22 @@
#import menu
import random
propability = 40
coins_per_head = 0.5
coins = 5
def coin_flip(propability, coins, coins_per_head):
while True:
result = random.randint(0, 100)
if result in range(0,propability):
print(*'Kopf')
coins += coins_per_head
print('')
print(f'Du hast {coins} coins')
input()
elif result in range(propability,100):
print('Zahl')
input()
coin_flip(propability, coins, coins_per_head)