Skip to content

Instantly share code, notes, and snippets.

@captDaylight
Last active May 15, 2016 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save captDaylight/8ab9c10b1525df0b49e84db558672692 to your computer and use it in GitHub Desktop.
Save captDaylight/8ab9c10b1525df0b49e84db558672692 to your computer and use it in GitHub Desktop.
...
if (userData) {
const playerTwo = userData[1]; // player two's id is at the first index of match results
const gameData = {
id: channel,
players: {
[user]: {
accepted: true,
played: '',
},
[playerTwo]: {
accepted: false,
played: '',
},
},
};
} else {
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment