-
Notifications
You must be signed in to change notification settings - Fork 2
JSON Protocols
caelinp edited this page Oct 20, 2018
·
9 revisions
When the player wants to queue up for a game, the client must emit an event called queue_for_game
which sends a JSON message with the following structure:
{"username": "Johnny", "course": "CPEN321", "rank": 5, "pic" : "xx"}
where the player_id
is p_xxxxxxxxxx
, p
indicating the string represents a player and the 10 x
s are a series of numbers unique to that player.
The question database holds JSON strings representing questions, structured like so:
{"question": "What is the color of an orange?", "correct_ans": "orange", "wrong_ans1": "red", "wrong_ans2": "blue", "wrong_ans3": "all of the above", "difficulty": 5, "creator_id": 1234567890, "prof_verified": true, "reported": false}