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
853 tests across the shared (744), 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.
97
+
883 tests across the shared (770), schema (19), 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.
97
98
98
99
### Build and Deploy
99
100
@@ -143,15 +144,15 @@ See the [Ruleset Authoring Guide](docs/ruleset-authoring.md) for the full format
143
144
144
145
## Project Status
145
146
146
-
All four implementation phases are **complete** with **853 passing tests** across shared (744), schema (15), and host (94) packages.
147
+
All four implementation phases are **complete** with **883 passing tests** across shared (770), schema (19), 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.
"publicVariables": ["...optional list of variable names exposed to clients"],
82
83
"phases": ["...array of phase definitions (the FSM)"],
83
84
"scoring": {
84
85
"method": "expression",
@@ -538,7 +539,7 @@ sandboxed evaluator.
538
539
539
540
| Category | Operators |
540
541
|---|---|
541
-
| Arithmetic |`+`, `-`, `*`, `/`|
542
+
| Arithmetic |`+`, `-`, `*`, `/`, `%`|
542
543
| Comparison |`==`, `!=`, `<`, `>`, `<=`, `>=`|
543
544
| Logic |`&&`, `\|\|`, `!`|
544
545
| Unary |`-` (negation), `!` (logical not) |
@@ -816,11 +817,23 @@ Variables can appear in scoring expressions:
816
817
}
817
818
```
818
819
820
+
### Public Variables
821
+
822
+
By default, all variables and string variables are exposed to clients in the `PlayerView`. To restrict which variables are visible, add a `publicVariables` array to the ruleset:
823
+
824
+
```json
825
+
{
826
+
"publicVariables": ["score", "round"]
827
+
}
828
+
```
829
+
830
+
When specified, only the named variables (both numeric and string) are included in the client-facing `PlayerView`. Variables not listed are hidden from all players. If omitted, all variables are exposed (backward compatible).
831
+
819
832
### Variables in Player Views
820
833
821
-
All variables are included in `PlayerView` — they are global game state visible
834
+
All variables are included in `PlayerView`by default — they are global game state visible
822
835
to all players. The client can display them (e.g., showing the running total on
823
-
the TV screen).
836
+
the TV screen). Use `publicVariables` (see above) to restrict which variables are sent to clients.
0 commit comments