summaryrefslogtreecommitdiff
path: root/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'server.py')
-rw-r--r--server.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/server.py b/server.py
index 76eddd8..f2bdf15 100644
--- a/server.py
+++ b/server.py
@@ -41,6 +41,12 @@ async def handle_socket(request: web.Request):
))
continue
board.push(user_move)
+ await ws.send_json(dict(
+ event='accept_move',
+ board=board.fen(),
+ lastmove=user_move.uci(),
+ ))
+ await asyncio.sleep(1.5)
# candidates = await engine.analyse(board, chess.engine.Limit(time=1), multipv=100)
my_move: chess.Move = random.choice(list(board.legal_moves))
board.push(my_move)