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
- 09bf82…149a:4
games details
NewGame
func(opponent .uverse.address) intNewGame creates a game. Caller is X, opponent is O. Returns the game id.
- OID
- 09bf82…149a: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
- 09bf82…149a:9
Move details
lines
[8][3]int- OID
- 09bf82…149a:11
lines details
won
func(b [9]int, mark int) bool- OID
- 09bf82…149a:20
won details
markName
func(m int) string- OID
- 09bf82…149a:21
markName details
cellGlyph
func(m int) string- OID
- 09bf82…149a:22
cellGlyph details
GetGame
func(id int) (*v1.Game, .uverse.error)GetGame returns a game by id (read helper for tests / callers).
- OID
- 09bf82…149a:23
GetGame details
renderBoard
func(b [9]int) string- OID
- 09bf82…149a:24
renderBoard details
gameStatus
func(g *v1.Game) string- OID
- 09bf82…149a:25
gameStatus details
Render
func(path string) stringRender draws the list of games, or a single game board at path "/\<id>".
- OID
- 09bf82…149a:26
Render details
renderList
func() string- OID
- 09bf82…149a:27
renderList details
empty
:
untyped bigint
=(0 <untyped> bigint)
markX
:
untyped bigint
=(1 <untyped> bigint)
markO
:
untyped bigint
=(2 <untyped> bigint)
Game
:
type
=v1.Game