Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

doc.gno

1.17 Kb · 24 lines
 1// v0 - Unaudited: This is an initial version that has not yet been formally audited.
 2// Use in production at your own risk.
 3//
 4// Package game is the on-chain part of gnofly, a multiplayer plane game. It is
 5// the source of truth for everything an admin can tune: the game parameters,
 6// the roles and the treasury. It also keeps what the referee attests and what
 7// has lasting value: the kills, on the kill leaderboard. Skins and planes are
 8// tokens of their own realms, gnofly/nfts/skins and gnofly/nfts/planes, which
 9// ask this one who the admins are and where the treasury is.
10//
11// Three kinds of callers write to it:
12//
13//   - the owner and the admins tune the game (SetParam, ...). Every such
14//     write bumps Version, which is how the game server knows it has to read
15//     StateJSON again;
16//   - referees, the game servers, record kills (SubmitKills).
17//
18// Challenge runs never reach the chain: the game server defines the
19// challenges, scores the runs and keeps the session boards.
20//
21// Reads are plain functions meant for vm/qeval. The ones ending in JSON
22// return a single string holding a JSON document. Render exposes the same
23// data as markdown for gnoweb.
24package game