func Accept
crossing ActionAccept starts a pending game. Only the invited player may call it.
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.
Accept starts a pending game. Only the invited player may call it.
DeclareTriggers declares the "your turn" trigger in the gnotif registry. The registry sees this realm as the caller, so the trigger is verified.
Leave cancels a pending game or ends a started one, and deletes it.
NewGame invites opponent to a game and returns its id. The caller plays first once opponent accepts.
Play takes the caller's turn in game and passes it to the other player.
Render serves "" (the first page), "page/N" and "game/<id>".