diff --git a/Bop_it_sensors.py b/Bop_it_sensors.py index f330451..448a3ed 100644 --- a/Bop_it_sensors.py +++ b/Bop_it_sensors.py @@ -45,7 +45,9 @@ def command_spin(): print(f"Spin me... {used_direction}!") rotate.value = 0 # damit jede Runde wieder bei Null anfängt, Werte würden allgemein vom -1 bis 1 reichen result = rotate.wait_for_rotate(timeout=10) - if result > 0 and used_direction == "clockwise" or result < 0 and used_direction == "counter-clockwise": + print(rotate.value) + print(result) + if result and rotate.value > 0 and used_direction == "clockwise" or result and rotate.value < 0 and used_direction == "counter-clockwise": print(success_message()) return 1 else: @@ -65,7 +67,7 @@ def main(): print("Every correct action will give you a point.") print("How many can you get?") print("Let's go!") - list_command_choices =[command_tilt, command_spin, command_blind, command_scream] + list_command_choices =[command_spin] #command_tilt, command_spin, command_blind, command_scream] while result != -1: score += result # war zuerst ein paar Zeilen weiter unten, hat dann aber nach einer falschen Runde den Score erhöht time.sleep(0.5)