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

blocksPerDay

untyped bigint

blocksPerDay is the number of blocks that constitutes one "day" / one round. The secret word is fixed for the whole span, then rotates.

Value

(7200 <untyped> bigint)

maxWrong

untyped bigint

maxWrong is the number of wrong guesses allowed before the game is lost.

Value

(6 <untyped> bigint)

words

[]string (len=15)

words is the built-in dictionary. Kept lowercase, letters only.

Open
OID
0a866b…9a43:4
words details (len=15)

+15 more Inspect slice

round

type

round holds the shared state for a single day's game.

Value

v0.round

rounds

*v0.Tree

rounds maps a day index (decimal string) to its round. Persisted across calls.

Open
OID
0a866b…9a43:6
rounds details

Inspect pointer

dayIndex

func() int64

dayIndex returns the current day index derived from block height.

Open
OID
0a866b…9a43:8
dayIndex details

Inspect func

wordForDay

func(day int64) string

wordForDay picks a word deterministically from the list for the given day.

Open
OID
0a866b…9a43:10
wordForDay details

Inspect func

dayKey

func(day int64) string

dayKey formats a day index as a stable decimal string key.

Open
OID
0a866b…9a43:11
dayKey details

Inspect func

current

func() *v0.round

current returns (creating if needed) the round for the current day.

Open
OID
0a866b…9a43:12
current details

Inspect func

normalizeLetter

func(letter string) (string, bool)

normalizeLetter lowercases and validates a single a-z letter, returning it and true on success.

Open
OID
0a866b…9a43:13
normalizeLetter details

Inspect func

Guess

func(letter string)

Guess submits a single letter for the current day's shared game. It reveals matching letters or costs a life. Aborts on bad input or when the game is already over.

Open
OID
0a866b…9a43:14
Guess details

Inspect func

unsafeCaller

func() string

unsafeCaller returns the caller address as a string, preferring the crossing convention when available.

Open
OID
0a866b…9a43:15
unsafeCaller details

Inspect func

boolStr

func(b bool) string

boolStr renders a bool compactly.

Open
OID
0a866b…9a43:16
boolStr details

Inspect func

itoa

func(n int64) string

itoa renders an int64 as decimal (avl-free tiny helper reused by Render).

Open
OID
0a866b…9a43:17
itoa details

Inspect func

gallows

func(wrong int) string

gallows renders the ASCII stage for the given wrong-count (0..6).

Open
OID
0a866b…9a43:18
gallows details

Inspect func

Render

func(path string) string

Render shows the current day's game: gallows, masked word, guesses, status.

Open
OID
0a866b…9a43:19
Render details

Inspect func
blocksPerDay : untyped bigint =(7200 <untyped> bigint)
maxWrong : untyped bigint =(6 <untyped> bigint)
words : []string (len=15) Inspect
round : type =v0.round
rounds : *v0.Tree Inspect
dayIndex : func() int64 Inspect
wordForDay : func(day int64) string Inspect
dayKey : func(day int64) string Inspect
current : func() *v0.round Inspect
normalizeLetter : func(letter string) (string, bool) Inspect
Guess : func(letter string) Inspect
unsafeCaller : func() string Inspect
boolStr : func(b bool) string Inspect
itoa : func(n int64) string Inspect
gallows : func(wrong int) string Inspect
Render : func(path string) string Inspect