empty
untyped bigintCell states.
Value
(0 <untyped> bigint)
markX
untyped bigintCell states.
Value
(1 <untyped> bigint)
markO
untyped bigintCell states.
Value
(2 <untyped> bigint)
Game
typeGame holds a single tic-tac-toe match. It carries no id field: the id belongs to the store, which hands it back on lookup and iteration.
Value
v1.Game
games
*v0.Storegames is keyed by store.ID, whose avl key is fixed-width by construction. v0 kept its own nextID plus a pad() that zero-padded to width 12, which stopped ordering correctly at the 10^12th game.
- OID
- 0c72d4…0551:4
games details
NewGame
func(opponent .uverse.address) intNewGame creates a game. Caller is X, opponent is O. Returns the game id.
- OID
- 0c72d4…0551:7
NewGame details
Move
func(gameID int, cell int)Move plays cell (0-8) for the calling player. Enforces turn order and rejects taken cells.
- OID
- 0c72d4…0551:9
Move details
lines
[8][3]int- OID
- 0c72d4…0551:11
lines details
won
func(b [9]int, mark int) bool- OID
- 0c72d4…0551:20
won details
markName
func(m int) string- OID
- 0c72d4…0551:21
markName details
cellGlyph
func(m int) string- OID
- 0c72d4…0551:22
cellGlyph details
GetGame
func(id int) (*v1.Game, .uverse.error)GetGame returns a game by id (read helper for tests / callers).
- OID
- 0c72d4…0551:23
GetGame details
renderBoard
func(b [9]int) string- OID
- 0c72d4…0551:24
renderBoard details
gameStatus
func(g *v1.Game) string- OID
- 0c72d4…0551:25
gameStatus details
Render
func(path string) stringRender draws the list of games, or a single game board at path "/\<id>".
- OID
- 0c72d4…0551:26
Render details
renderList
func() string- OID
- 0c72d4…0551:27