diff --git a/docs/events.md b/docs/events.md index a64e647..8744b47 100644 --- a/docs/events.md +++ b/docs/events.md @@ -14,38 +14,8 @@ event response gets sent to multiple clients. **Broadcasted events will use the* --- ## `server.info` -Asks the server for information about it. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| Yes | Yes | No - -### Payload Types: -Request Payload: N/A - -Response Payload: `ServerInfoResponse` - ---- - -## `lobby.create` -Creates a new game lobby for players to be able to join. - -### Supported Event Types -| Request | Response | Broadcasted -| ------- | -------- | ----------- -| Yes | Yes | No - -### Payload Types: -Request Payload: `LobbyCreateRequest` - -Response Payload: `LobbyCreateResponse` - ---- - -## `lobby.join` -Joins the user into a game, the game must be in the lobby state in order to -join into it. +Retrieves information about the server that the client is currently connected +to. ### Supported Event Types | Request | Response | Broadcasted @@ -53,23 +23,21 @@ join into it. | Yes | Yes | No ### Payloads -Request Payload: `LobbyJoinRequest` +Request Payload: N/A -Response Payload: `LobbyJoinResponse` +Response Payload: `IServerInfo` --- -## `players.update` -Tells the client that the player list has been updated. This event is broadcast -when a new player joins the game, or when a player has updated their ship -design. +## `event name` +event description ### Supported Event Types | Request | Response | Broadcasted | ------- | -------- | ----------- -| No | Yes | Yes +| Yes | Yes | No ### Payloads -Request Payload: N/A +Request Payload: `Itype name` -Response Payload: `PlayerUpdateResponse` \ No newline at end of file +Response Payload: `Itype name` \ No newline at end of file diff --git a/docs/raw_events_list.md b/docs/raw_events_list.md new file mode 100644 index 0000000..0120f50 --- /dev/null +++ b/docs/raw_events_list.md @@ -0,0 +1,20 @@ +# Lobby management +Create lobby: `lobby.create` +Delete lobby: `lobby.delete` +Join lobby: `lobby.players.join` +leave lobby: `lobby.players.leave` +kick player from lobby: `lobby.players.leave` +change lobby option(s): `lobby.options` + +player joined lobby: `lobby.players.update` +update ship design: `lobby.players.update` + + +# Informational +server info: `server.info` + + +# In-Game +alerting the players who's turn it is: `game.turn` +distributing card piles: `game.mining.piles` +picking a card pile: `game.mining.choose`