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

eightball source realm

Package eightball is a Magic 8-Ball realm: ask a yes/no question and the block height decides your fate. Deterministi...

Overview

Package eightball is a Magic 8-Ball realm: ask a yes/no question and the block height decides your fate. Deterministic (no real randomness on-chain).

Functions 3

func Ask

crossing Action
1func Ask(cur realm, question string) string
source

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).

func Asked

Action
1func Asked() int
source

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

func Render

1func Render(path string) string
source

Render is the gnoweb Markdown view.

Imports 5

  • chain stdlib
  • chain/runtime stdlib
  • chain/runtime/unsafe stdlib
  • strconv stdlib
  • strings stdlib

Source Files 2