player
typeplayer holds the accumulated state for a single address.
Value
v0.player
players
v0.Treeplayers maps address string -> \*player. An avl.Tree gives deterministic iteration (unlike a Go map) so Render output is stable across nodes.
- OID
- 0bceed…8c54:4
players details
get
func(addr .uverse.address) *v0.playerget returns the stored \*player for addr, creating one if absent.
- OID
- 0bceed…8c54:5
get details
caller
func() .uverse.address- OID
- 0bceed…8c54:7
caller details
AddPoints
func(n int)AddPoints adds n points to the caller's total. n must be positive. Crossing function: MsgCall dispatches only to crossing functions, and the cur.IsCurrent() check authenticates the live call frame before we trust the caller identity derived from it.
- OID
- 0bceed…8c54:8
AddPoints details
SetName
func(name string)SetName attaches a display name (max 32 bytes) to the caller. Passing an empty string clears the name and falls back to the address in Render.
- OID
- 0bceed…8c54:9
SetName details
byRank
typebyRank implements sort.Interface, ranking players by points descending with ties broken by address so the order is deterministic across nodes. The gno sort package exposes Sort/Stable over an Interface — there is no sort.Slice.
Value
v0.byRank
snapshot
func() []*v0.playersnapshot collects all players into a slice ranked by points descending.
- OID
- 0bceed…8c54:10
snapshot details
medal
func(rank int) stringmedal returns the emoji for a given zero-based rank, or "" past the podium.
- OID
- 0bceed…8c54:11
medal details
Render
func(path string) stringRender produces the Markdown leaderboard. It is NOT a crossing function (read-only view, no cur realm parameter).
- OID
- 0bceed…8c54:12