You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests live in the shared and host packages and use Vitest:
89
+
Tests live in the shared, schema, and host packages and use Vitest:
87
90
88
91
```sh
89
92
cd packages/shared
90
93
bunx vitest run
91
94
```
92
95
93
-
898 tests across 16 test files cover the engine core (expression evaluator, builtins, interpreter, PRNG, schema validation, player views, game phases, integration scenarios, host bridge) and the host package (storage, importers). The client package is verified via `tsc` type-checking and Vite production build.
96
+
913 tests across the shared (804), schema (15), and host (94) packages cover the engine core (expression evaluator, builtins, interpreter, PRNG, schema validation, player views, game phases, integration scenarios), schema meta fields, and the host package (storage, importers). The client package is verified via `tsc` type-checking and Vite production build.
94
97
95
98
### Build and Deploy
96
99
@@ -113,6 +116,18 @@ Type-check the shared and client packages:
113
116
bun run typecheck
114
117
```
115
118
119
+
### Scripts
120
+
121
+
| Command | Description |
122
+
|---------|-------------|
123
+
|`bun run dev:client`| Start the client Vite dev server with HMR |
124
+
|`bun run build:client`| TypeScript check + Vite production build |
125
+
|`bun run bundle:client`| Bundle client dist into host's Android assets |
126
+
|`bun run build:android`| Bundle client + Expo Android build |
127
+
|`bun run typecheck`| Type-check shared and client packages |
128
+
|`bun run validate`| Validate all rulesets against the JSON Schema |
129
+
|`bun run catalog`| Generate `catalog.json` from all rulesets' metadata |
130
+
116
131
## Rulesets
117
132
118
133
A `.cardgame.json` file declaratively defines everything the engine needs to run a card game: metadata, deck composition, zones, roles, phases (FSM), scoring, visibility rules, and UI hints.
@@ -125,18 +140,21 @@ The [`rulesets/`](rulesets/) directory contains example rulesets:
125
140
-**`ninety-nine.cardgame.json`** — an accumulation game demonstrating custom variables (`get_var`, `set_var`, `inc_var`), conditional card effects with `if()`, and turn reversal
126
141
-**`uno.cardgame.json`** — a shedding game demonstrating `play_card` action effects, custom variables for color choice, declare with params, Skip/Reverse/Draw Two effects, and multi-phase Wild card flow
127
142
143
+
Rulesets support optional catalog fields (`description`, `tags`, `license`) in their `meta` block. Run `bun run catalog` to generate a `catalog.json` index of all rulesets for browsing and discovery. Run `bun run validate` to validate all rulesets against the schema.
144
+
128
145
See the [Ruleset Authoring Guide](docs/ruleset-authoring.md) for the full format specification, expression language reference, and annotated examples. The [Engine API Reference](packages/shared/README.md) documents all public functions and builtins.
129
146
130
147
## Project Status
131
148
132
-
All four implementation phases are **complete** with **898 passing tests** across 16 test files.
149
+
All four implementation phases are **complete** with **913 passing tests** across shared (804), schema (15), and host (94) packages.
The app builds and deploys to Android TV via `bun run build:android`. The host runs an HTTP+WebSocket server via CouchKit; phones connect by scanning a QR code displayed on the TV.
0 commit comments