Skip to content

Add a game

Read The games framework first. In short, a new game is:

  1. Rules in Rust: a crate in crates/games/<name>, copied from tictactoe, implementing games_core::Game and, for a computer player, games_core::Opponent.
  2. Registered in WebAssembly: in crates/games-wasm/src/registry.rs.
  3. A TypeScript package: packages/games/<name>, copied from tictactoe, exporting wasmGame('<kind>') and the generated types.
  4. A board: a GameUi in packages/games-ui/src/<name>/.
  5. Registered in both apps: the server’s apps/server/src/games/registry.ts and the browser’s apps/web/src/games/catalog.ts. The Games menu, demo contacts and the Retro Zone pick it up from there.
  6. Tests: gameContract with a fixed seed, and a check that view never shows hidden state.

The full checklist, including solo scoring and levels, is in the games-core README. The board contract is in Game panel.