history
typehistory holds every roll made by a single caller, most recent last.
Value
v0.history
count
[6]int- OID
- 059cf0…77a0:4
count details
total
intValue
0
players
*v0.Tree- OID
- 059cf0…77a0:7
players details
deriveFace
func(height int64, addr string, n int) intderiveFace turns public entropy into a face in \[1,6]. It is deterministic: the same (height, addr, n) always yields the same face, so any observer can recompute and verify a roll. Uses a simple FNV-1a-style hash over the mixed entropy bytes so different callers at the same height get different faces.
- OID
- 059cf0…77a0:9
deriveFace details
Roll
func() intRoll performs one dice roll for the calling account and records it. It is a crossing function (gno 0.9 interrealm convention: \`cur realm\` first parameter). Callers invoke it as Roll(cross(cur)). The result is derived deterministically from the current block height, the caller address, and the caller's prior roll count — no stored secret, fully verifiable.
- OID
- 059cf0…77a0:11
Roll details
RollsOf
func(addr string) []intRollsOf returns the recorded roll history for an address (oldest first). Read-only helper, safe to call as a query.
- OID
- 059cf0…77a0:12
RollsOf details
Total
func() intTotal returns the global roll count.
- OID
- 059cf0…77a0:13
Total details
Distribution
func() [6]intDistribution returns the global per-face counts, faces 1-6.
- OID
- 059cf0…77a0:14
Distribution details
bar
func(n int, max int, width int) stringbar renders a proportional ▓/░ bar of fixed width for a face's share.
- OID
- 059cf0…77a0:15
bar details
Render
func(path string) stringRender returns the realm's gnoweb Markdown view. Render is NOT a crossing function (no \`cur realm\` param) — it is a read-only query surface. It shows the total roll count, a distribution bar chart for faces 1-6, and the most recent rolls.
- OID
- 059cf0…77a0:16