- clients[obj.target].sock.send(JSON.stringify({code:"newmove",move:obj.move}));
- break;
- case "ping":
- // If this code is reached, then obj.target is connected
- socket.send(JSON.stringify({code:"pong"}));
+ clients[obj.target].sock.send(JSON.stringify(
+ {code:"newmove",move:obj.move}));