diff --git a/Bop_it.py b/Bop_it.py index 268d394..f10951b 100644 --- a/Bop_it.py +++ b/Bop_it.py @@ -1,24 +1,49 @@ import random def score(x): - return score + pass def command_tilt(): - pass + action = input() + if action == "0": + return 1 + else: + return -1 + def command_blind(): - pass + action = input() + if action == "0": + return 1 + else: + return -1 def command_scream(): - pass + action = input() + if action == "0": + return 1 + else: + return -1 def command_spin(): - pass + 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] - print(random.choices(list_command_choices)) + 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() \ No newline at end of file