The README names the optional hooks a game may implement
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
60b3c0e60a
commit
af25b672f1
@@ -14,6 +14,15 @@ The game itself is one file. `src/lib/game/index.ts` implements `GameSpec`
|
||||
the ops tools never look past it. The template ships with a demo game,
|
||||
High Card, so everything runs before you have written a line.
|
||||
|
||||
Beyond the required methods, a game opts into what it needs through
|
||||
optional hooks, and without one the kit behaves as if it were not there:
|
||||
`validate` (refuse a move with a reason), `seatsFor` (fewer seats for some
|
||||
options), `settled` (drafts a player may replace until final), `rankable`
|
||||
(a secret ranking before the deal, read by `create`), `botPress` and
|
||||
`parting` (bots that talk, remember by notes and read the talk in
|
||||
`botInput`), and `tally` / `tallyBegun` (the game's own lines in the tally).
|
||||
`CONVENTIONS.md` says what each does.
|
||||
|
||||
## Start a game
|
||||
|
||||
./new-game.sh <slug> "<Name>" [port] [domain]
|
||||
@@ -38,7 +47,7 @@ Run the demo locally from a new project:
|
||||
src/lib/net/ client.ts (calls, held seats, socket), room.svelte.ts (the room store), talk.ts, view.ts
|
||||
src/lib/components/ Hall, Lobby, TableTalk, ReportSlip, Board (demo; replace it)
|
||||
src/routes/ the hall, /join/[code], /rules, /guide
|
||||
server/src/ index (routes), rooms (game-agnostic), store (ledger), reports (the desk), ratelimit
|
||||
server/src/ index (routes), rooms (game-agnostic), store (ledger), reports (the desk), tally, ratelimit, and their tests
|
||||
deploy/ deploy, setup, Caddy, systemd, cron, gate + replay, backup, rollup, pulse, visitors, Slack alert, reports tools
|
||||
.claude/skills/ <slug>-visitors, <slug>-pulse, <slug>-reports
|
||||
|
||||
|
||||
Reference in New Issue
Block a user