-
Notifications
You must be signed in to change notification settings - Fork 2
Client Module Level Overview
Subtlemon edited this page Apr 26, 2019
·
9 revisions
-
App.js
- Entry.js
- RoomComponent.js
-
GameComponent.js
- StartComponent.js
- GamePhaseComponent.js
-
DrawComponent.js
- DrawCanvas.js
- GuessComponent.js
-
DrawComponent.js
-
SpectateComponent.js
- ChainLinkView.js
Main component of the React App.
- Creates or joins rooms in Firebase, then holds a reference in state.
- Establishes user's presence in room.
- Establishes listener for game settings to start game.
- Renders one of its direct children based on current state.
- Entry.js (GUI for user inputted room name and nickname).
- RoomComponent.js
- GameComponent.js
Waiting lobby.
- Renders GUI for users with presence in room.
- Renders GUI for shared game settings.
- Writes game settings to trigger game start in App.js.
Game Manager.
- Establishes user presence under activePlayers.
- Establishes listener to progress state (change chains) when no players have presence as notReady.
- Renders one of its direct children based on current state.
- StartComponent.js
- GamePhaseComponent.js (switches between drawing or guessing phase based on latest entry in chain).
- SpectateComponent.js
Start a chalk chain.
- Renders GUI for user inputted initial word/phrase.
- Establishes user presence under notReady until ready.
- Pushes new chain into chains in game in Firebase.
Add a drawing to the current chain.
- Renders GUI for users to draw the latest word/phrase in the current chain.
- Establishes user presence under notReady until ready.
- Add the new image to the current chain.
Add a guess to the current chain.
- Renders GUI for users to guess the latest image in the current chain.
- Establishes user presence under notReady until ready.
- Add the word/phrase to the current chain.
View game results.
- Renders GUI to view entire chain at a time.
- Establishes listener to share current chain view with other players.
- Moves back to RoomComponent.js via callback.