Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -229,11 +229,11 @@ async def handler(websocket):
|
|
229 |
# First player starts a new game.
|
230 |
await start(websocket, message)
|
231 |
|
232 |
-
|
233 |
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
# elif "watch" in event:
|
238 |
# # Spectator watches an existing game.
|
239 |
# await watch(websocket, event["watch"])
|
|
|
229 |
# First player starts a new game.
|
230 |
await start(websocket, message)
|
231 |
|
232 |
+
assert event["type"] == "cmd"
|
233 |
|
234 |
+
if "command" in event:
|
235 |
+
# Second player joins an existing game.
|
236 |
+
await execute_command(websocket, project_name, event["command"])
|
237 |
# elif "watch" in event:
|
238 |
# # Spectator watches an existing game.
|
239 |
# await watch(websocket, event["watch"])
|