49 lines
942 B
Python
49 lines
942 B
Python
import random
|
|
|
|
def score(x):
|
|
pass
|
|
|
|
def command_tilt():
|
|
action = input()
|
|
if action == "0":
|
|
return 1
|
|
else:
|
|
return -1
|
|
|
|
|
|
def command_blind():
|
|
action = input()
|
|
if action == "0":
|
|
return 1
|
|
else:
|
|
return -1
|
|
|
|
def command_scream():
|
|
action = input()
|
|
if action == "0":
|
|
return 1
|
|
else:
|
|
return -1
|
|
|
|
def command_spin():
|
|
action = input()
|
|
if action == "0":
|
|
return 1
|
|
else:
|
|
return -1
|
|
|
|
def main():
|
|
score = 0
|
|
result = 0
|
|
print("Let's play a Round of 'Raspberry says'!")
|
|
list_command_choices = [command_tilt, command_blind, command_scream, command_spin]
|
|
while result != -1:
|
|
score += result # war zuerst zwei Zeilen weiter unten, hat dann aber nach einer falschen Runde den Score erhöht
|
|
round = random.choice(list_command_choices)
|
|
result = round()
|
|
print(f"Game over! Your Score is {score}")
|
|
|
|
|
|
|
|
|
|
main() |