A simple trivia for Midburn.org Tickets purchase process. The purpose behind such trivia game is to increase awareness of the burning man 10 principles, the nature of the Midburn festival, guidance for new participants how to act during the event.
The trivia will be fun, easy to solve and educating.
- Each Burning Man principles will have couple of questions in the system.
- User should answer at least 10 questions right in a successful game.
- Each game will be randomize easy and hard questions to answer.
- Each game will include questions from 10 categories. A successful game will include answers from all categories.
- Each game may have as much questions as needed. The game will stop after 10 questions will be answered correctly.
- When opening a new Midburn profile.
- When buying a Midburn Festival Ticket.
- When receiving a ticket from a different Midburn profile.
- Ruby on Rails
- MySQL
- Rspec
- HTML hosted on API's Assets pipeline
- AngularJS
- Javascript library to communicate with API
Facts:
- Game id will be generated for every time the game is about to be played.
- Game will be associated to a foreign user model in a one to many relation - 1 user may have multiple games 'played'.
- Each game will have a set of correctly answered questions and incorrectly answered questions. New randomized questions will not be part of those sets.
- Games are resumable (within a certain time) or can get abandoned. This will be determine by the game's status
[on-going, finished, expired]
There are 3 types of questions:
- Text question
- Image answers question
- Image question
Facts:
- A question's level will be one of the following
[easy, medium, hard]
- A question's category will be set on one of the following categories:
["inclusion", "gifting", "decommodification", "radical-self-reliance", "radical-self-expression", "communal-effort", "civic-responsibility", "leaving-no-trace", "participation", "immediacy", "other"]
- Each question has a set of answers (correct or incorrect answers).
- Each question has a set of CORRECT answers.
- Answers are a coupled sub-class of question.
Games can be created, played and be tested using a standard modern CRUD RESTful API model. This decouples the user interface and the control layer of the games.
{ "status": "ok"}
{ "status": "error", "message": "you are trying to do something wrong"}
Creates a new game for a specified user. Will return the games token.
{
"user_id": "678"
}
{ "status": "ok", "token": "gAm3_t0k3n"}
{
}
{
"question": {
"question_id": 45,
"question_type": "text",
"question_text": "What's the color of the sunrise while on acid?",
"answers": [
{"answer_id": 1, "answer_text": "Pinkish red"},
{"answer_id": 2, "answer_text": "Greenish purple"},
{"answer_id": 3, "answer_text": "The sun does not rise on the desert"},
{"answer_id": 4, "answer_text": "Dolphins & unicorns"}
]
}
"status": "ok"
}
{ "status": "error", "message": "game is over, next question is not available"}
{
}
{
"token": "gAm3_t0k3n",
"game_status": "on-going"
}
{
"answers": [1,2]
}
{
"question_response": "correct",
"status": "ok"
}
{
"question_response": "incorrect",
"status": "ok"
}