Stage 7 (wip): wire remaining ops (backend REST, FBS, gateway transcode) + real UI transport
backend: REST handlers for pass/exchange/resign/hint/evaluate/check_word/complaint/history/chat-list/nudge + new game.ListForAccount (my games) + seat display_name resolution pkg/fbs: GameActionRequest/ExchangeRequest/EvalRequest/EvalResult/CheckWordRequest/WordCheckResult/ComplaintRequest/HintResult/History/GameList/ChatList + SeatView.display_name; committed Go regenerated (flatc 23.5.26) gateway: 11 new transcode ops + backendclient methods + FB encoders ui: edge TS codegen (flatc --ts + protoc-gen-es, committed), FlatBuffers<->model codec, real connect-web transport (binary, bearer auth, Subscribe). prod bundle ~69KB gzip JS
This commit is contained in:
+69
-1
@@ -23,13 +23,15 @@ table TileRecord {
|
||||
blank:bool;
|
||||
}
|
||||
|
||||
// SeatView is one seat's public standing in a game.
|
||||
// SeatView is one seat's public standing in a game. display_name is resolved by the
|
||||
// backend from the account store (added trailing — backward-compatible).
|
||||
table SeatView {
|
||||
seat:int;
|
||||
account_id:string;
|
||||
score:int;
|
||||
hints_used:int;
|
||||
is_winner:bool;
|
||||
display_name:string;
|
||||
}
|
||||
|
||||
// GameView is the shared (non-private) game summary.
|
||||
@@ -143,6 +145,67 @@ table StateView {
|
||||
hints_remaining:int;
|
||||
}
|
||||
|
||||
// GameActionRequest carries just a game id (pass / resign / hint / history).
|
||||
table GameActionRequest {
|
||||
game_id:string;
|
||||
}
|
||||
|
||||
// ExchangeRequest swaps the listed rack tiles back into the bag.
|
||||
table ExchangeRequest {
|
||||
game_id:string;
|
||||
tiles:[string];
|
||||
}
|
||||
|
||||
// EvalRequest previews a tentative play without committing it.
|
||||
table EvalRequest {
|
||||
game_id:string;
|
||||
dir:string;
|
||||
tiles:[TileRecord];
|
||||
}
|
||||
|
||||
// EvalResult is an unlimited move preview: legality, score and the words formed.
|
||||
table EvalResult {
|
||||
legal:bool;
|
||||
score:int;
|
||||
words:[string];
|
||||
}
|
||||
|
||||
// CheckWordRequest looks a word up in the game's pinned dictionary.
|
||||
table CheckWordRequest {
|
||||
game_id:string;
|
||||
word:string;
|
||||
}
|
||||
|
||||
// WordCheckResult is the dictionary lookup outcome.
|
||||
table WordCheckResult {
|
||||
word:string;
|
||||
legal:bool;
|
||||
}
|
||||
|
||||
// ComplaintRequest disputes a word-check result.
|
||||
table ComplaintRequest {
|
||||
game_id:string;
|
||||
word:string;
|
||||
note:string;
|
||||
}
|
||||
|
||||
// HintResult is the top-ranked move plus the remaining hint budget.
|
||||
table HintResult {
|
||||
move:MoveRecord;
|
||||
hints_remaining:int;
|
||||
}
|
||||
|
||||
// History is a game's decoded move journal — the source for client board replay.
|
||||
table History {
|
||||
game_id:string;
|
||||
moves:[MoveRecord];
|
||||
}
|
||||
|
||||
// GameList is the caller's games (active and finished) for the lobby.
|
||||
table GameList {
|
||||
games:[GameView];
|
||||
}
|
||||
|
||||
// --- lobby (authenticated) ---
|
||||
|
||||
// EnqueueRequest joins the per-variant auto-match pool.
|
||||
@@ -174,6 +237,11 @@ table ChatMessage {
|
||||
created_at_unix:long;
|
||||
}
|
||||
|
||||
// ChatList is a game's chat history.
|
||||
table ChatList {
|
||||
messages:[ChatMessage];
|
||||
}
|
||||
|
||||
// --- push event payloads ---
|
||||
|
||||
// YourTurnEvent signals that it is now the recipient's turn.
|
||||
|
||||
Reference in New Issue
Block a user