Ganz Rudimentaerer Entwurf der Grundmechanik des Spiels
This commit is contained in:
Binary file not shown.
@@ -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)
|
||||||
Reference in New Issue
Block a user