Restrict random buttons, Change button press highlight

This commit is contained in:
Dominic Zimmer
2022-10-30 13:23:23 +01:00
parent 58f102af60
commit cc55cbbe6b
2 changed files with 6 additions and 7 deletions

View File

@@ -207,13 +207,14 @@ async def _(get_input: InputGetter, set_output: OutputSetter):
set_output(output)
random_buttons : list[Button]= ["up", "down", "left", "right", "a", "b"];
@arbiter.mode("random", allow_multitouch=False, min_time=20, max_time=90)
@arbiter.mode("random", allow_multitouch=False, min_time=30, max_time=90)
async def _(get_input: InputGetter, set_output: OutputSetter):
while True:
await asyncio.sleep(settings.democracy_vote_cycle)
the_choice = random.choice([button for button in Button])
the_choice = random.choice([button for button in random_buttons])
if not the_choice:
set_output(EMPTY_INPUT)