Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 state

Back to all declarations

empty

untyped bigint

Cell states.

Value

(0 <untyped> bigint)

markX

untyped bigint

Cell states.

Value

(1 <untyped> bigint)

markO

untyped bigint

Cell states.

Value

(2 <untyped> bigint)

Game

type

Game holds a single tic-tac-toe match.

Value

v0.Game

nextID

int

Value

1

NewGame

func(opponent .uverse.address) int

NewGame creates a game. Caller is X, opponent is O. Returns the game id.

Open
OID
0ef095…b444:9
NewGame details

Inspect func

Move

func(gameID int, cell int)

Move plays cell (0-8) for the calling player. Enforces turn order and rejects taken cells.

Open
OID
0ef095…b444:10
Move details

Inspect func

GetGame

func(id int) (*v0.Game, .uverse.error)

GetGame returns a game by id (read helper for tests / callers).

Open
OID
0ef095…b444:24
GetGame details

Inspect func

renderBoard

func(b [9]int) string
Open
OID
0ef095…b444:25
renderBoard details

Inspect func

gameStatus

func(g *v0.Game) string
Open
OID
0ef095…b444:26
gameStatus details

Inspect func

Render

func(path string) string

Render draws the list of games, or a single game board at path "/\<id>".

Open
OID
0ef095…b444:27
Render details

Inspect func
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
pad : func(id int) string Inspect
NewGame : func(opponent .uverse.address) int Inspect
Move : func(gameID int, cell int) Inspect
lines : [8][3]int Inspect
won : func(b [9]int, mark int) bool Inspect
markName : func(m int) string Inspect
cellGlyph : func(m int) string Inspect
GetGame : func(id int) (*v0.Game, .uverse.error) Inspect
renderBoard : func(b [9]int) string Inspect
gameStatus : func(g *v0.Game) string Inspect
Render : func(path string) string Inspect
renderList : func() string Inspect