From cc55cbbe6b4a3c7203dff3381eefde534e9597d8 Mon Sep 17 00:00:00 2001 From: Dominic Zimmer Date: Sun, 30 Oct 2022 13:23:23 +0100 Subject: [PATCH] Restrict random buttons, Change button press highlight --- backend/backend/arbiter.py | 5 +++-- frontend/src/Client.css | 8 +++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/backend/backend/arbiter.py b/backend/backend/arbiter.py index 4128fb3..deb103d 100644 --- a/backend/backend/arbiter.py +++ b/backend/backend/arbiter.py @@ -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) diff --git a/frontend/src/Client.css b/frontend/src/Client.css index d1d3a2b..e34f175 100644 --- a/frontend/src/Client.css +++ b/frontend/src/Client.css @@ -27,10 +27,6 @@ --button-color: lightgrey; } -body { - background-color: black; -} - .button { line-height: var(--button-height); height: var(--button-height); @@ -42,7 +38,7 @@ body { } .button.pressed { - filter: drop-shadow(2px 2px 6px black); + filter: drop-shadow(2px 2px 6px white); } .button-a, .button-b { --button-height: 50px; @@ -157,5 +153,7 @@ body { */ .client { + height: 100vh; + width: 100vw; background-color: black; } \ No newline at end of file