Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 state

Back to all declarations

shake

type

Value

v0.shake

history

[]v0.shake

Value

<zero>

answerIndex

func(height int64, n int) int

answerIndex maps (block height, prior shakes) to an answer slot. Pure and deterministic so it can be tested without touching realm state.

Open
OID
018a07…22f2:6
answerIndex details

Inspect func

Ask

func(question string) string

Ask poses a question to the Magic 8-Ball and returns its answer. Crossing function: it mutates persistent state, so it takes \`cur realm\` (gno 0.9).

Open
OID
018a07…22f2:8
Ask details

Inspect func

Asked

func() int

Asked returns how many questions have been asked. Read-only.

Open
OID
018a07…22f2:9
Asked details

Inspect func

Render

func(path string) string

Render is the gnoweb Markdown view.

Open
OID
018a07…22f2:10
Render details

Inspect func

shortAddr

func(a string) string
Open
OID
018a07…22f2:11
shortAddr details

Inspect func
answers : []string (len=20) Inspect
shake : type =v0.shake
history : []v0.shake =<zero>
answerIndex : func(height int64, n int) int Inspect
Ask : func(question string) string Inspect
Asked : func() int Inspect
Render : func(path string) string Inspect
shortAddr : func(a string) string Inspect