robert-damoc / game-stats

0 stars 0 forks source link

[EPIC] Create Game Round Flow #42

Closed robert-damoc closed 10 months ago

robert-damoc commented 1 year ago

This will represent each round of the game. Feel free to create 2 branches/PRs if you need, 1 for table, and 1 for model.

Table

Unique validation for (game_id, player_id, round_type), which means that in a game, a player can play a type of round just once (e.g. You can only choose King of Hearts just once)

The game_id will be the game where this round was played The player_id will be the player that chooses this round The round_type will be a string value from a pre-defined enum The scores will hold all the scores of the playing players. E.g. { marius: -100, robert: -300 } for queens, or { marius: 0, robert: -400 } for king of hearts

Model