Backend "view" - evelinawahlstrom/game-project-client GitHub Wiki
MODELS https://www.vertabelo.com/blog/a-database-model-for-simple-board-games/
A. SIMPLE VERSION - IMPLEMENT IN OUR GAME
- User
- name (unique:
- password
- game_id
- Game (lobby)
- id
- max nr of players
- start/endtime
- player start_id
- result
- Moves
- Pieces (X, O)
- Row
- Column
B. COMPLEX VERSION
- Player/user
- name: unique
- password
- Participant
- id
- player_id
- game_id
- score
- Game
- start
- id
- max nr players
- player started id
- move/game time limit
- result_id
- MOVE
- id
- game_id
- piece_id
- participant_id
- move type id
- move order
- move notation (?)
- Result - storing all possible endings of a game (win on either side, draw...)
- id
- description
- LOBBY
- Store games, see if full or not (?)
Implement stream (or socket.io) on every endpoint (?)
- Count wins/loss for each player: https://github.com/hgmallar/TicTacToe/blob/master/models/users.js
- Updates a users score: https://github.com/hgmallar/TicTacToe/blob/master/routes/apiRoutes.js