-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrainstorming.txt
43 lines (32 loc) · 1023 Bytes
/
brainstorming.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Database:
- Game type (e.g. chess, tic-tac-toe, blackjack, dominion):
Name
Number of players (can be a range)
- User
Username
Password
Friends
- Game
type
user(s) who played
outcome (winner, score, etc)
Example: blackjack
2-players
Everyone gets a score (cards in hand)
There is a winner, or a tie
Example: dominion
2-4 players
Everyone has a score (number of victory points)
there is a winner, or a tie
Example: chess
2 players
Store the final board state, and all moves made
There is a winner, or it's a draw
Example: tetris
1 player
Store the final score, and final board state
Sockets manage rooms, with different namespaces for different games.
Put users in rooms based on the ID of their game
Messages are moves from users (must decide if moves are valid), and emit game updates to users
Store game states in an object (different object for each type of game), with keys being game IDs
You can play private games with your friends, or join a random game against anyone else