|
@@ -56,6 +56,7 @@ class randomFree {
|
|
p2.emit('joinGame', matchInfo.playerTwoState);
|
|
p2.emit('joinGame', matchInfo.playerTwoState);
|
|
|
|
|
|
const broadcast = (data) => {
|
|
const broadcast = (data) => {
|
|
|
|
+ data.timestamp = new Date().getTime();
|
|
nsp.in(channel).emit('move', data);
|
|
nsp.in(channel).emit('move', data);
|
|
};
|
|
};
|
|
p1.on('broadcast', broadcast);
|
|
p1.on('broadcast', broadcast);
|