From 6bb4a63b5729e9ff5033cb8027c22cb58129a662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Fri, 12 Feb 2021 14:50:40 +0100 Subject: [PATCH] Coroutines --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 516b0e3..b9051fc 100644 --- a/README.md +++ b/README.md @@ -2292,8 +2292,8 @@ async def main_coroutine(screen): async def random_controller(id_, moves): while True: - move = id_, random.choice(list(D)) - moves.put_nowait(move) + d = random.choice(list(D)) + moves.put_nowait((id_, d)) await asyncio.sleep(random.random() / 2) async def human_controller(screen, moves): diff --git a/index.html b/index.html index ccdec7e..482154d 100644 --- a/index.html +++ b/index.html @@ -2015,8 +2015,8 @@ D = enum.Enum('D', 'n async def random_controller(id_, moves): while True: - move = id_, random.choice(list(D)) - moves.put_nowait(move) + d = random.choice(list(D)) + moves.put_nowait((id_, d)) await asyncio.sleep(random.random() / 2) async def human_controller(screen, moves):