99 lines
2.0 KiB
Plaintext
99 lines
2.0 KiB
Plaintext
# Description
|
|
A party game of sexual ambitions.
|
|
|
|
Which Shrek character does your friend secretly want to bang? Wanna hint? It's not the ogre.
|
|
|
|
# Requirements
|
|
A web browser based game.
|
|
|
|
|
|
Workflow:
|
|
A. Landing page
|
|
--> Create new game
|
|
--> Join existing game
|
|
B. Create new game
|
|
1. Click button
|
|
- Make an https request to server
|
|
POST
|
|
/games
|
|
RESPONSE
|
|
UUID game_id
|
|
- Parse game_id from response
|
|
--> Open game screen.
|
|
C. Join existing game
|
|
1. Enter game_id into input box
|
|
2. Click enter / hit button
|
|
--> Open game screen.
|
|
D. Open game screen.
|
|
- Validate game exists
|
|
- Make https request to server
|
|
GET
|
|
/games/<game_id>
|
|
OK -> proceed
|
|
404 -> error
|
|
- Join game
|
|
1. Enter Name (string)
|
|
2. Take picture (html & javascript)
|
|
3. Join game
|
|
- Upload image to server
|
|
POST
|
|
/images
|
|
RESPONSE
|
|
OK -> image_id
|
|
- Make https request to server
|
|
PUT
|
|
/games/<game_id>
|
|
{
|
|
"name": "",
|
|
"avatar": "image_id"
|
|
}
|
|
|
|
Ok, I found the hard part. What is the structure of data for each game?
|
|
|
|
Model
|
|
|
|
Image
|
|
- uuid
|
|
- filepath?
|
|
|
|
Game
|
|
- uuid
|
|
- code: alpha-numeric 6 figure string
|
|
- active: bool
|
|
- player_ids: list of players
|
|
- round_ids: list of rounds
|
|
|
|
Player
|
|
- uuid
|
|
- display_name
|
|
- avatar_id: image_id
|
|
- is_prompt: bool
|
|
|
|
Round
|
|
- uuid
|
|
- active: bool
|
|
- answer_player_id: player_uuid
|
|
- prompts: list of prompt_ids
|
|
|
|
Prompt
|
|
- uuid
|
|
- prompt_id: player_uuid
|
|
- answers: list of answer_ids
|
|
|
|
Answers
|
|
- uuid
|
|
- player_id: player_uuid
|
|
- would_smash: bool
|
|
|
|
Each game has:
|
|
1. player_ids - UUIDs for players participating.
|
|
- is_prompt = false
|
|
2. rounds - list, n = number of players (each player goes once)
|
|
- answer_player: player uuid
|
|
- active: bool
|
|
- prompts: list, n = 10.
|
|
- player_id: uuid, where is_prompt = true
|
|
- answers: list, n = number of players
|
|
- player_id: UUID of player that submitted
|
|
- would_smash: bool
|