Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v1 state

Back to all declarations

beats

func(m v0.Move) v0.Move

beats returns the move that defeats m.

Open
OID
033658…d037:3
beats details

Inspect func

playerState

type

playerState is the persisted record for one address.

Value

v1.playerState

players

v0.Tree

// address string -> \*playerState

Open
OID
033658…d037:6
players details

Inspect ref

nonce

int

Value

0

totalRounds

int

Value

0

oracleCorrect

int

// rounds the oracle won by successfully countering

Value

0

topOutwitter

.uverse.address

Value

<zero>

topOutwitterWins

int

Value

0

getOrCreate

func(addr .uverse.address) *v1.playerState
Open
OID
033658…d037:12
getOrCreate details

Inspect func

predict

func(ps *v1.playerState, seed int64) v0.Move

predict 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.

Open
OID
033658…d037:13
predict details

Inspect func

Play

func(moveStr string) string

Play 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".

Open
OID
033658…d037:14
Play details

Inspect func

renderPlayer

func(rawAddr string) string
Open
OID
033658…d037:16
renderPlayer details

Inspect func

Render

func(path string) string

Render shows the oracle's dashboard at "", or one player's record when path is their bech32 address.

Open
OID
033658…d037:17
Render details

Inspect func
beats : func(m v0.Move) v0.Move Inspect
playerState : type =v1.playerState
players : v0.Tree Inspect
nonce : int =0
totalRounds : int =0
oracleCorrect : int =0
topOutwitter : .uverse.address =<zero>
topOutwitterWins : int =0
getOrCreate : func(addr .uverse.address) *v1.playerState Inspect
predict : func(ps *v1.playerState, seed int64) v0.Move Inspect
Play : func(moveStr string) string Inspect
renderHome : func() string Inspect
renderPlayer : func(rawAddr string) string Inspect
Render : func(path string) string Inspect