cols
untyped bigintValue
(7 <untyped> bigint)
rows
untyped bigintValue
(6 <untyped> bigint)
empty
untyped bigintcell values
Value
(0 <untyped> bigint)
red
untyped bigint// 🔴 game creator (caller of NewGame)
Value
(1 <untyped> bigint)
yel
untyped bigint// 🟡 opponent
Value
(2 <untyped> bigint)
Game
typeGame holds the full state of one Connect Four match. board is indexed board\[row]\[col]; row 0 is the BOTTOM row.
Value
v0.Game
games
*v0.Tree// id (zero-padded string) -> \*Game
- OID
- 071267…e91b:4
games details
nextID
int64Value
0
idKey
func(id int64) string- OID
- 071267…e91b:7
idKey details
NewGame
func(opponent .uverse.address) int64NewGame creates a match between the caller (🔴) and opponent (🟡). Returns the new game id.
- OID
- 071267…e91b:9
NewGame details
getGame
func(id int64) (*v0.Game, .uverse.error)- OID
- 071267…e91b:10
getGame details
Drop
func(gameID int64, column int)Drop places the caller's disc into the given column (0-6). Enforces turn order by caller, rejects full columns, and detects a 4-in-a-row win or a draw.
- OID
- 071267…e91b:11
Drop details
full
func(b *[6][7]int) bool- OID
- 071267…e91b:12
full details
wins
func(b *[6][7]int, r int, c int, p int) boolwins checks whether the disc just placed at (r,c) for player p completes a run of 4 in any of the four directions.
- OID
- 071267…e91b:13
wins details
run
func(b *[6][7]int, r int, c int, dr int, dc int, p int) int- OID
- 071267…e91b:14
run details
glyph
func(v int) string- OID
- 071267…e91b:15
glyph details
Render
func(path string) stringRender draws the board with 🔴🟡· and shows whose turn / the winner. path "" lists all games; path "\<id>" shows a single board.
- OID
- 071267…e91b:16
Render details
renderList
func() string- OID
- 071267…e91b:17
renderList details
short
func(a .uverse.address) string- OID
- 071267…e91b:18
short details
renderGame
func(g *v0.Game) string- OID
- 071267…e91b:19
renderGame details
cols
:
untyped bigint
=(7 <untyped> bigint)
rows
:
untyped bigint
=(6 <untyped> bigint)
empty
:
untyped bigint
=(0 <untyped> bigint)
red
:
untyped bigint
=(1 <untyped> bigint)
yel
:
untyped bigint
=(2 <untyped> bigint)
Game
:
type
=v0.Game
games : *v0.Tree Inspect
nextID
:
int64
=0