Realm
v1
gno.land/r/moul/x/daily/rpsduel/v1
Render
Rock-Paper-Scissors Duel
Challenge another address to rock-paper-scissors, async and fair: you commit your move as a hash, they reply in the open, then you reveal to settle it. Stall on revealing a losing round and your opponent can claim a forfeit win once the window expires.
- Total duels resolved: 0
- No champion yet -- be the first to win a duel.
How to play
- Pick a move and a random salt, e.g.
rock+xyz123. - Compute your commitment:
ComputeCommit("rock", "xyz123")(read-only call). Open(opponentAddr, commit)-- opens the duel, returns its ID.- The opponent calls
Accept(id, "paper"|"scissors"|"rock"). - You call
Reveal(id, "rock", "xyz123")-- must match your commitment exactly. - If you never reveal, the opponent can call
ClaimForfeit(id)after 50 blocks.
View a duel at this realm's path plus its ID (e.g. .../rpsduel:3), or a player's record plus their address (e.g. .../rpsduel:g1youraddress...).
Open duels
none right now
Source (qfile)
README.md gnomod.toml rpsduel.gno