question
typequestion is one fixed trivia entry.
Value
v1.question
playerState
typeplayerState is one address's progress through the question bank.
Value
v1.playerState
questions
[]v1.question- OID
- 0e68bf…bddb:4
questions details
players
*v0.Tree// addr(string) -> \*playerState
- OID
- 0e68bf…bddb:26
players details
startIndex
func(addr string, height int64) intstartIndex picks a deterministic starting question for a brand-new player, spreading players across the bank using their address and the height of their first answer as entropy.
- OID
- 0e68bf…bddb:28
startIndex details
getPlayer
func(addr string) *v1.playerStategetPlayer returns addr's state, lazily creating it on first contact.
- OID
- 0e68bf…bddb:30
getPlayer details
nextIndex
func(cur int, streak int, n int) intnextIndex advances a solved player to a fresh-feeling next question: the step grows with the streak so a long run doesn't loop through the bank in a visibly fixed order.
- OID
- 0e68bf…bddb:31
nextIndex details
Answer
func(choiceIdx int) stringAnswer submits a choice (0..3) for the caller's current question. Crossing function: caller invokes as Answer(cross(cur), choiceIdx).
- OID
- 0e68bf…bddb:32
Answer details
leaderboardEntry
typeleaderboardEntry is a snapshot row used only for rendering, sorted by best streak descending.
Value
v1.leaderboardEntry
leaderboard
func() []v1.leaderboardEntry- OID
- 0e68bf…bddb:33
leaderboard details
renderQuestion
func(b *strings.Builder, p *v1.playerState)- OID
- 0e68bf…bddb:34
renderQuestion details
Render
func(path string) stringRender produces the gnoweb Markdown view. The root path shows the rules and the leaderboard; a path of a bech32 address shows that player's current question and stats.
- OID
- 0e68bf…bddb:35