Add bot to play against.
This commit is contained in:
+17
-1
@@ -14,12 +14,28 @@ type LogEntry struct {
|
||||
Phase Phase `json:"phase"`
|
||||
Seat int `json:"seat"` // acting seat, or -1 when none
|
||||
Icon string `json:"icon,omitempty"` // leading emoji
|
||||
Kind string `json:"kind,omitempty"` // e.g. "result" (battle outcome)
|
||||
Kind string `json:"kind,omitempty"` // structured tag; see constants below
|
||||
Text string `json:"text"` // the sentence itself
|
||||
Source string `json:"source,omitempty"` // card id that caused a spawn
|
||||
Spawn string `json:"spawn,omitempty"` // "apple" | "bee" for spawn entries
|
||||
// The fields below add machine-readable copies of facts the Text already
|
||||
// states publicly, so observers (the AI player included) don't have to
|
||||
// parse English. They must never carry information the text doesn't.
|
||||
Count int `json:"count,omitempty"` // e.g. apples gained
|
||||
CardName string `json:"cardName,omitempty"` // named card, when public
|
||||
Cards []string `json:"cards,omitempty"` // card ids involved, when public
|
||||
}
|
||||
|
||||
// Structured LogEntry.Kind tags. Only "result" affects the client; the rest
|
||||
// exist so observers can follow the public action stream structurally.
|
||||
const (
|
||||
LogResult = "result" // battle outcome (client holds it until the replay ends)
|
||||
LogBuy = "buy" // Seat bought Source/CardName from the shop row
|
||||
LogSell = "sell" // Seat sold Source/CardName (it became an apple)
|
||||
LogTrade = "trade" // Seat traded in Cards for a next-tier pick
|
||||
LogTradePick = "tradePick" // Seat took their pick; CardName set when revealed
|
||||
)
|
||||
|
||||
// addLog appends an entry, stamping it with the next sequence number and the
|
||||
// current round/phase. Callers set Seat/Icon/Text (and Source/Spawn when the
|
||||
// entry represents something spawning off a card).
|
||||
|
||||
Reference in New Issue
Block a user