forked from bromigos/react-chess
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflow.txt
More file actions
21 lines (16 loc) · 675 Bytes
/
Copy pathflow.txt
File metadata and controls
21 lines (16 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
==================================================================
'/': check/set client UUID, db check active game for UUID
if(user)=> go to game
else => prompt for name and go to landing page;
Client 1 sets up new game, 'go'
--create shortcode/endpoint/gameid
--create game in db with options & UUID of client1
--show chessboard and waiting message
Client 2 goes to /:gameid
--if(gameId) => check open game / UUID matches
-- else => redirect to '/'
-- gameWasOpen? set UUID of client 2 in db for gameId
-- Set orientation for game. set in db,
-- UUID matches?
-server emits chats & gamePgn/'start'(randomly chosen orientation included) to both clients\
--sup?