func DeclareTriggers
crossing ActionDeclareTriggers declares the "your turn" trigger in the gnotif registry. The registry sees this realm as the caller, so the trigger is verified.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package pingpong is a two-player game where the only move is to pass the turn. It exists to demonstrate gnotif: every...
Package pingpong is a two-player game where the only move is to pass the turn. It exists to demonstrate gnotif: every turn emits TurnPlayed, and the realm declares a verified gnotif trigger that tells the next player.
DeclareTriggers declares the "your turn" trigger in the gnotif registry. The registry sees this realm as the caller, so the trigger is verified.
NewGame opens a game against opponent and returns its id. The caller plays first.
Play takes the caller's turn in game and passes it to the other player.
Render lists the games with their players, turn and next player.