Everyone who connects provides a game ID and player ID.
- Leader makes
POST
request to/games
, receives agameId
andplayerId
. - Leader opens WebSocket connection to
/connect?gameId={gameId}&playerId={playerId}
. Connection is used to assign nickname and handle the rest of the game.
- Player makes
GET
request to/games/{gameId}/join
, receives aplayerId
if code was valid. - Player opens WebSocket connection to
/connect?gameId={gameId}&playerId={playerId}
. - Player starts receiving informtaion about the game (current players, whether it's started, etc.) over that connection. Player also receives an ID.
- Player chooses a nickname over the socket connection. Server acknowledges.
- Game continues...