Tweak the documentation for events

This commit is contained in:
Oliver Akins 2022-03-07 00:51:30 -06:00
parent a8311a6834
commit 4476f3e18c
No known key found for this signature in database
GPG key ID: 3C2014AF9457AF99
2 changed files with 29 additions and 41 deletions

View file

@ -14,38 +14,8 @@ event response gets sent to multiple clients. **Broadcasted events will use the*
--- ---
## `server.info` ## `server.info`
Asks the server for information about it. Retrieves information about the server that the client is currently connected
to.
### 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.
### Supported Event Types ### Supported Event Types
| Request | Response | Broadcasted | Request | Response | Broadcasted
@ -53,23 +23,21 @@ join into it.
| Yes | Yes | No | Yes | Yes | No
### Payloads ### Payloads
Request Payload: `LobbyJoinRequest` Request Payload: N/A
Response Payload: `LobbyJoinResponse` Response Payload: `IServerInfo`
--- ---
## `players.update` ## `event name`
Tells the client that the player list has been updated. This event is broadcast event description
when a new player joins the game, or when a player has updated their ship
design.
### Supported Event Types ### Supported Event Types
| Request | Response | Broadcasted | Request | Response | Broadcasted
| ------- | -------- | ----------- | ------- | -------- | -----------
| No | Yes | Yes | Yes | Yes | No
### Payloads ### Payloads
Request Payload: N/A Request Payload: `Itype name`
Response Payload: `PlayerUpdateResponse` Response Payload: `Itype name`

20
docs/raw_events_list.md Normal file
View file

@ -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`