Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -139,9 +139,9 @@ async def exe(websocket,connected):
|
|
139 |
# Spectator watches an existing game.
|
140 |
await watch(websocket, event["watch"]) #Todo
|
141 |
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
except RuntimeError as exc:
|
146 |
# Send an "error" event if the move was illegal.
|
147 |
await error(websocket, str(exc))
|
|
|
139 |
# Spectator watches an existing game.
|
140 |
await watch(websocket, event["watch"]) #Todo
|
141 |
|
142 |
+
else:
|
143 |
+
# First player starts a new game.
|
144 |
+
await start(websocket, message)
|
145 |
except RuntimeError as exc:
|
146 |
# Send an "error" event if the move was illegal.
|
147 |
await error(websocket, str(exc))
|