Restrict random buttons, Change button press highlight
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user