Get desktop application:
View/edit binary Protocol Buffers messages
GameEventService will handle our game event API. We can connect bots to this API, or use it for sandbox mode, or for live annotations, etc.
CreateAnnotatedGame creates a standalone annotated game in the editor.
PlayerInfo for annotated games do not need to be tied to a Woogles UUID. These games are meant for sandbox/annotation of a typically IRL game. The order that the players are sent in must be the order in which they play.
The lexicon is a string such as NWL20, CSW21. It must be supported by Woogles.
public will make this game public upon creation - i.e., findable within the interface. Otherwise, a game ID is required. (Not yet implemented)
DeleteAnnotatedGame deletes a standalone annotated game (not part of a broadcast).
(message has no fields)
GetGameDocument fetches the latest GameDocument for the passed-in ID.
GetGameOwner returns the creator information for an annotated game
Assume we can never have so many unfinished games that we'd need limits and offsets. Ideally we should only have one unfinished game per authed player at a time.
(message has no fields)
PatchGameDocument merges in the passed-in GameDocument with what's on the server. The passed-in GameDocument should be a partial document
SendGameEvent is how one sends game events to the Woogles API.
event is the client gameplay event that represents a player's move. A move can be a tile placement, a pass, an exchange, a challenge, or a resign. Maybe other types in the future. This event is validated, processed, and turned into one or more ipc.GameEvents, for storage in a GameDocument.
The user_id for this gameplay event.
The event_number is ignored unless the amendment flag is on.
Amendment is true if we are amending a previous, already played move. In that case, the event number is the index of the event that we wish to edit. Note: not every ClientGameplayEvent maps 1-to-1 with internal event indexes. In order to be sure you are editing the right event, you should fetch the latest version of the GameDocument first (use the GetGameDocument call).
SetRacks sets the rack for the players of the game.
SetRacksEvent is the event used for sending player racks.
racks are sent as byte arrays, in the same order as the players. If you only have partial or unknown rack info, send a partial or empty rack for that user. Note: internally, every letter is represented by a single byte. The letters A-Z map to 1-26, and the blank (?) maps to 0, for the English letter distribution. For other letter distributions, the mapping orders can be found in the letter distribution files in this repo.
The event_number is ignored unless the `amendment` flag is set.
`amendment` should be true if we are amending a previous, already played rack. In that case, the event number is the index of the event whose rack we wish to edit.
Used as response type in: GameEventService.GetGamesForEditor, GameEventService.GetMyUnfinishedGames, GameEventService.GetRecentAnnotatedGames
Used in:
GameEventResponse doesn't need to have any extra data. The GameEvent API will still use sockets to broadcast game information.
Used as response type in: GameEventService.PatchGameDocument, GameEventService.ReplaceGameDocument, GameEventService.SendGameEvent, GameEventService.SetAnnotatedGamePrivacy, GameEventService.SetRacks
(message has no fields)