Move
typeMove is one of rock, paper, or scissors, ordered so that (winner - loser + 3) % 3 == 1 for every winning pair.
Value
v1.Move
Rock
v1.MoveValue
<zero>
Paper
v1.MoveValue
<zero>
Scissors
v1.MoveValue
<zero>
moveName
func(m v1.Move) string- OID
- 0cc7ad…82e2:3
moveName details
parseMove
func(s string) (v1.Move, bool)- OID
- 0cc7ad…82e2:5
parseMove details
judge
func(p v1.Move, h v1.Move) intjudge returns 0 for a tie, 1 if p beats h, 2 if h beats p.
- OID
- 0cc7ad…82e2:6
judge details
beats
func(m v1.Move) v1.Movebeats returns the move that defeats m.
- OID
- 0cc7ad…82e2:7
beats details
playerState
typeplayerState is the persisted record for one address.
Value
v1.playerState
players
v0.Tree// address string -> \*playerState
- OID
- 0cc7ad…82e2:9
players details
nonce
intValue
0
totalRounds
intValue
0
oracleCorrect
int// rounds the oracle won by successfully countering
Value
0
topOutwitter
.uverse.addressValue
<zero>
topOutwitterWins
intValue
0
getOrCreate
func(addr .uverse.address) *v1.playerState- OID
- 0cc7ad…82e2:15
getOrCreate details
predict
func(ps *v1.playerState, seed int64) v1.Movepredict guesses the player's next move as the most-played move in their history so far. Ties (including a fresh player's all-zero history) fall back to a chain-height-derived seed so the oracle doesn't always break ties the same way.
- OID
- 0cc7ad…82e2:16
predict details
Play
func(moveStr string) stringPlay pits the caller against the oracle: it predicts your next move from your own move history and throws the counter. Accepts "rock"/"paper"/"scissors" or the single-letter shorthand "r"/"p"/"s".
- OID
- 0cc7ad…82e2:17
Play details
renderHome
func() string- OID
- 0cc7ad…82e2:18
renderHome details
renderPlayer
func(rawAddr string) string- OID
- 0cc7ad…82e2:19
renderPlayer details
Render
func(path string) stringRender shows the oracle's dashboard at "", or one player's record when path is their bech32 address.
- OID
- 0cc7ad…82e2:20