File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2292,8 +2292,8 @@ async def main_coroutine(screen):
22922292
22932293async def random_controller (id_ , moves ):
22942294 while True :
2295- move = id_, random.choice(list (D))
2296- moves.put_nowait(move )
2295+ d = random.choice(list (D))
2296+ moves.put_nowait((id_, d) )
22972297 await asyncio.sleep(random.random() / 2 )
22982298
22992299async def human_controller (screen , moves ):
Original file line number Diff line number Diff line change 20152015
20162016< span class ="hljs-keyword "> async</ span > < span class ="hljs-function "> < span class ="hljs-keyword "> def</ span > < span class ="hljs-title "> random_controller</ span > < span class ="hljs-params "> (id_, moves)</ span > :</ span >
20172017 < span class ="hljs-keyword "> while</ span > < span class ="hljs-keyword "> True</ span > :
2018- move = id_, random.choice(list(D))
2019- moves.put_nowait(move )
2018+ d = random.choice(list(D))
2019+ moves.put_nowait((id_, d) )
20202020 < span class ="hljs-keyword "> await</ span > asyncio.sleep(random.random() / < span class ="hljs-number "> 2</ span > )
20212021
20222022< span class ="hljs-keyword "> async</ span > < span class ="hljs-function "> < span class ="hljs-keyword "> def</ span > < span class ="hljs-title "> human_controller</ span > < span class ="hljs-params "> (screen, moves)</ span > :</ span >
You can’t perform that action at this time.
0 commit comments