maxAttempts
untyped bigintmaxAttempts is the number of guesses a player gets per day.
Value
(6 <untyped> bigint)
wordLen
untyped bigintwordLen is the fixed length of every word / guess.
Value
(5 <untyped> bigint)
blocksPerDay
untyped bigintblocksPerDay controls how many blocks share the same secret word. Testnet blocks are fast, so this is a pragmatic "day" for a demo puzzle rather than a wall-clock day. Deterministic: derived only from block height.
Value
(17280 <untyped> bigint)
words
[]stringwords is the built-in dictionary of candidate secret words. All entries are exactly wordLen lowercase letters.
- OID
- 05b8a8β¦2bc4:4
words details
board
typeboard holds one player's guesses for a given day.
Value
v0.board
players
map[string]*v0.boardplayers maps a caller address string to that player's current board. A plain map is fine here: keys are addresses, iteration order is never used for rendering (we only ever look up the caller's own board).
- OID
- 05b8a8β¦2bc4:6
players details
dayIndex
func(height int64) int64dayIndex returns the deterministic day index for a given block height.
- OID
- 05b8a8β¦2bc4:7
dayIndex details
wordForDay
func(day int64) stringwordForDay returns the secret word for the given day index. Deterministic: a pure function of the day index and the built-in dictionary.
- OID
- 05b8a8β¦2bc4:9
wordForDay details
currentDay
func() int64currentDay returns today's day index from the chain height.
- OID
- 05b8a8β¦2bc4:10
currentDay details
score
func(guess string, secret string) stringscore compares a guess against the secret and returns wordLen emoji tiles: π© right letter right spot, π¨ right letter wrong spot, β¬ letter absent. Standard Wordle two-pass scoring so duplicate letters are handled correctly.
- OID
- 05b8a8β¦2bc4:11
score details
isFiveLetters
func(w string) boolisFiveLetters reports whether w is exactly wordLen ASCII lowercase letters.
- OID
- 05b8a8β¦2bc4:12
isFiveLetters details
Guess
func(word string)Guess records a five-letter guess for the caller against today's word. It is a crossing (state-mutating) function: callers invoke it as Guess(cross(cur), "crane"). Identity is taken from the live crossing frame after the IsCurrent authentication check.
- OID
- 05b8a8β¦2bc4:13
Guess details
Render
func(path string) stringRender returns the caller's board as Markdown. It is NOT a crossing function (no cur realm parameter). It reads the viewer via the stack-walking unsafe.PreviousRealm(); an unknown viewer simply sees an empty board.
- OID
- 05b8a8β¦2bc4:14
Render details
writeRules
func(sb *strings.Builder)writeRules appends the legend / how-to-play block.
- OID
- 05b8a8β¦2bc4:15
writeRules details
itoa
func(n int) stringitoa formats a small non-negative int (attempt counts) without importing strconv, keeping the dependency surface minimal.
- OID
- 05b8a8β¦2bc4:16
itoa details
i64toa
func(n int64) stringi64toa formats an int64 as decimal.
- OID
- 05b8a8β¦2bc4:17