Ramesh-vani commited on
Commit
3056848
·
verified ·
1 Parent(s): 729f631

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- # assert event["type"] == "cmd"
233
 
234
- # if "cmd" 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"])
 
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"])