Skip to content

Instantly share code, notes, and snippets.

@codyogden
Last active September 21, 2016 21:44
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 codyogden/068134c302c5cafa1d13a66f9e513fb6 to your computer and use it in GitHub Desktop.
Save codyogden/068134c302c5cafa1d13a66f9e513fb6 to your computer and use it in GitHub Desktop.
For a group project at Prime.
{
action: "start"
}
// Send back a true/false that a number is generated and the server is ready to play.
// What Client sends to server
{
action: "guess",
data:
{
guess: [
{
playerNumber: 1,
guess: 4000
},
{
playerNumer: 2,
guess: 5000
}
]
}
}
//What server sends back to client
{
data: [
{
playerNumber: 1,
rating: 0.43
},
{
playerNumber: 2,
rating: 1 //Winner
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment