-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconnect_four_high_level_overview.txt
41 lines (36 loc) · 1.91 KB
/
connect_four_high_level_overview.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
High-Level Services and Data-Flow for Online Connect Four:
- player list (like a directory or bookkeeper)
* list of users online
* and their status (busy, away, active)
- playing board
* contains 7x6 matrix/grid of unfilled circles
* must keep track of different coloured chips that are dropped (player chips)
* chips must be placed into the lowest available circle (bottom or on top of another chip)
* must recognize 4 chips of the same colour horizontally, vertically or diagonally
- opponent pairing (kind of like an MC or announcer)
* randomly chooses opponent for you from the list of people that are online
* determines whose turn it is to play
* determines the winner
Kate's Proposal :D
User Connectivity Service
- see how many users there are, randomly choose 2 users in the user queue
—> sends those 2 users to game backend or a user in the case of waiting game UI
Game backend
- Get 2 users information and its interactions
- compute each user’s game progress - connect 4
- Send those user’s game progress and user information to UI
Game UI
- do not compute, but do all UI stuff
—> sends user interactions to Game backend
A user comes in
-> user connectivity service notifies game UI that there is only one user
-> game ui shows user wait panel
-> another user comes in
-> user connectivity service notifies both UI and backend so that backend can start preparing a game and UI can now show the clear game UI
-> while playing, game UI constantly sends user interaction information to backend, backend computes, and user connectivity service makes sure that the users are kept online
-> if a user exits/ not kept online (user connectivity service notifies both), make the other user the winner, finish the game
-> if not, continue the game until the game ends
-> backend notifies ui who is the winner
-> ui shows the winner
-> game finished / backend wraps up
-> prepare for another game