Created
August 13, 2018 17:28
-
-
Save MikeShi42/58408851216de0d6d382cd89f92fa542 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
socket.on('actuate', function (data) { | |
const { grid, metadata } = data; // Get grid and metadata properties from client | |
const move = { | |
playerIndex, | |
grid, | |
metadata, | |
}; | |
// Emit the move to all other clients | |
socket.broadcast.emit('move', move); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment