Move
typeMove is one of rock, paper, or scissors, ordered so that (winner - loser + 3) % 3 == 1 for every winning pair.
Value
v0.Move
Rock
v0.MoveValue
<zero>
Paper
v0.MoveValue
<zero>
Scissors
v0.MoveValue
<zero>
winsNeeded
untyped bigintwinsNeeded is the number of round wins required to take a match.
Value
(2 <untyped> bigint)
match
typematch tracks an in-progress best-of-three series for one player.
Value
v0.match
playerState
typeplayerState is the persisted record for one address.
Value
v0.playerState
players
v0.Tree// address string -> \*playerState
- OID
- 03c83b…6b73:4
players details
nonce
intValue
0
totalRounds
intValue
0
champion
.uverse.addressValue
<zero>
championWins
intValue
0
moveName
func(m v0.Move) string- OID
- 03c83b…6b73:9
moveName details
parseMove
func(s string) (v0.Move, bool)- OID
- 03c83b…6b73:11
parseMove details
judge
func(p v0.Move, h v0.Move) intjudge returns 0 for a tie, 1 if p beats h, 2 if h beats p.
- OID
- 03c83b…6b73:12
judge details
pickHouseMove
func(caller .uverse.address, n int) v0.MovepickHouseMove derives a deterministic pseudo-random move from the current chain height, a monotonic per-realm nonce, and the caller's address, so repeated throws in the same block still diverge.
- OID
- 03c83b…6b73:13
pickHouseMove details
getOrCreate
func(addr .uverse.address) *v0.playerState- OID
- 03c83b…6b73:14
getOrCreate details
Throw
func(moveStr string) stringThrow plays one round of the caller's current match, starting a fresh match if none is in progress. Accepts "rock"/"paper"/"scissors" or the single-letter shorthand "r"/"p"/"s".
- OID
- 03c83b…6b73:15
Throw details
renderHome
func() string- OID
- 03c83b…6b73:16
renderHome details
escapeInline
func(s string) stringescapeInline neutralizes markdown-active characters in untrusted text before it's embedded inline in Render output.
- OID
- 03c83b…6b73:17
escapeInline details
renderPlayer
func(rawAddr string) string- OID
- 03c83b…6b73:18
renderPlayer details
Render
func(path string) stringRender shows the arena dashboard at "", or one player's record when path is their bech32 address.
- OID
- 03c83b…6b73:19