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