Skip to content Search Apps Documentation Source Content 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.

pingpong state

Back to all declarations

Game

type

Game is a match between First and Second. First plays turn 1.

Value

pingpong.Game

lastGame

v0.ID

Value

<zero>

declared

bool

Value

true

NewGame

func(opponent .uverse.address) string

NewGame opens a game against opponent and returns its id. The caller plays first.

Open
OID
00edf1…4d80:7
NewGame details

Inspect func

Play

func(game string)

Play takes the caller's turn in game and passes it to the other player.

Open
OID
00edf1…4d80:9
Play details

Inspect func

DeclareTriggers

func()

DeclareTriggers declares the "your turn" trigger in the gnotif registry. The registry sees this realm as the caller, so the trigger is verified.

Open
OID
00edf1…4d80:10
DeclareTriggers details

Inspect func

Render

func(path string) string

Render lists the games with their players, turn and next player.

Open
OID
00edf1…4d80:11
Render details

Inspect func
Game : type =pingpong.Game
games : v0.Tree Inspect
lastGame : v0.ID =<zero>
declared : bool =true
NewGame : func(opponent .uverse.address) string Inspect
Play : func(game string) Inspect
DeclareTriggers : func() Inspect
Render : func(path string) string Inspect