rock
untyped bigintMoves.
Value
(0 <untyped> bigint)
paper
untyped bigintMoves.
Value
(1 <untyped> bigint)
scissors
untyped bigintMoves.
Value
(2 <untyped> bigint)
moveNames
[3]string- OID
- 0a0f42…c009:4
moveNames details
outLose
untyped bigint// player loses
Value
(0 <untyped> bigint)
outDraw
untyped bigintOutcomes.
Value
(1 <untyped> bigint)
outWin
untyped bigint// player wins
Value
(2 <untyped> bigint)
tally
typetally holds a single player's cumulative record.
Value
v0.tally
round
typeround is one recorded game (for the recent-rounds table).
Value
v0.round
players
*v0.Tree// address string -> \*tally
- OID
- 0a0f42…c009:6
players details
rounds
[]v0.round// append-only history; Render shows the tail
Value
<zero>
totalWins
int// player wins
Value
0
totalLosses
int// player losses
Value
0
totalDraws
intState.
Value
0
totalRounds
intState.
Value
0
maxRecent
untyped bigintValue
(8 <untyped> bigint)
parseChoice
func(choice string) (int, bool)parseChoice maps a choice string to a move index; ok=false if invalid.
- OID
- 0a0f42…c009:13
parseChoice details
houseMove
func(height int64, playCount int) inthouseMove derives the house move deterministically from the chain height and the caller's play count (so repeated calls in the same block differ).
- OID
- 0a0f42…c009:15
houseMove details
decide
func(playerMove int, houseM int) intdecide returns the outcome from the player's perspective.
- OID
- 0a0f42…c009:16
decide details
getTally
func(key string) *v0.tally- OID
- 0a0f42…c009:17
getTally details
Play
func(choice string)Play plays one round against the chain. choice is "rock"|"paper"|"scissors" (single-letter shortcuts accepted). It panics on an invalid choice.
- OID
- 0a0f42…c009:18
Play details
outcomeName
func(o int) string- OID
- 0a0f42…c009:19
outcomeName details
winRate
func(wins int, plays int) string- OID
- 0a0f42…c009:20
winRate details
Render
func(path string) stringRender returns a Markdown dashboard: global tally, per-player table, and the last few rounds. It is caller-agnostic (no cur).
- OID
- 0a0f42…c009:21
Render details
shortAddr
func(a string) stringshortAddr abbreviates an address string for display.
- OID
- 0a0f42…c009:22