scores
[]int64scores is the worked example: eight slots, small enough to check by hand.
- OID
- 084eb0…71f2:4
scores details
holders
[]stringstakes is the weighted-draw example. The zero is the interesting entry: a holder with no stake must never be drawn, and that is a property of the search, not of the caller remembering to skip them.
- OID
- 084eb0…71f2:6
holders details
stakes
[]int64stakes is the weighted-draw example. The zero is the interesting entry: a holder with no stake must never be drawn, and that is a property of the search, not of the caller remembering to skip them.
- OID
- 084eb0…71f2:8
stakes details
Render
func(path string) stringRender renders the demo for gnoweb. Render("") / Render("/") -> the full demo
- OID
- 084eb0…71f2:9
Render details
joinInts
func(vals []int64) stringjoinInts formats a slice for display. Written out rather than reached for from a library because there is no sensible shared home for it yet.
- OID
- 084eb0…71f2:11
joinInts details
pct
func(part int64, whole int64) stringpct renders part/whole as a whole-number percentage. Integer arithmetic throughout: Render output has to be byte-identical on every validating node, and floating point is the usual way that stops being true.
- OID
- 084eb0…71f2:12