summaryrefslogtreecommitdiff
path: root/PLAN.md
diff options
context:
space:
mode:
Diffstat (limited to 'PLAN.md')
-rw-r--r--PLAN.md25
1 files changed, 14 insertions, 11 deletions
diff --git a/PLAN.md b/PLAN.md
index cec7ea5..6ff7294 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -192,18 +192,18 @@ Tooling notes (fixed during implementation):
Port of the complete engine — all of it, so later phases are UI-only:
-- [ ] `lib/Model/` → `server/lib/core/models/`
-- [ ] `Resource/line_builder/` (ability-line parser)
-- [ ] `Resource/game_data.dart` (disk-based loading) + test data loader
-- [ ] `Resource/state/` → GameState and all part files (plain fields + toJson/fromJson,
+- [x] `lib/Model/` → `server/lib/core/models/`
+- [x] `Resource/line_builder/` (ability-line parser)
+- [x] `Resource/game_data.dart` (disk-based loading) + test data loader
+- [x] `Resource/state/` → GameState and all part files (plain fields + toJson/fromJson,
keep the `GameSaveState` snapshot structure)
-- [ ] All 84 command files → `core/commands/` + **command registry** (wire name + args ↔
+- [x] All 84 command files → `core/commands/` + **command registry** (wire name + args ↔
constructor, incl. args validation)
-- [ ] All `*Methods` classes, `game_event.dart`, `stat_calculator.dart`, `card_stack.dart`,
+- [x] All `*Methods` classes, `game_event.dart`, `stat_calculator.dart`, `card_stack.dart`,
`enums.dart`
-- [ ] `action_handler.dart`: index, 250-deep history, save after every action, undo/redo
-- [ ] Port unit tests (`test/command/*`, `test/resource/*`, model tests) to the new core
-- [ ] Headless integration test: full round driven by command invocations — scenario setup →
+- [x] `action_handler.dart`: index, 250-deep history, save after every action, undo/redo
+- [x] Port unit tests (`test/command/*`, `test/resource/*`, model tests) to the new core
+- [x] Headless integration test: full round driven by command invocations — scenario setup →
characters → initiative → draw → turns → next round → round 2
**Milestone M1** — engine runs headless; ported test suite green.
@@ -320,6 +320,7 @@ changes, room sections, spectator view. *First end-to-end moment.*
| 2026-11-08 | Plan drafted. Decisions fixed: Dart server, TS+Svelte client, full parity, faithful UI. |
| 2026-11-08 | Plan approved. |
| 2026-11-08 | **Phase 0 complete** — server package (shelf + WS, hello/welcome handshake, smoke tests 5/5), web app (Svelte 5 + TS, protocol client, svelte-check clean, build OK), assets copied (73 MB), AGPL license, README, .gitignore, CI script passing end-to-end. |
+| 2026-11-12 | **Phase 1 complete / M1 reached** — full engine ported to `server/lib/core/` (models, state + 18 part files, 7 methods classes, game_methods, 79 command files, enums, card_stack, stat_calculator, action_handler, disk-based game_data, l10n, minimal line_builder per conventions §8b). Command registry: 82 entries (wire name ↔ constructor + arg validation; enum/object args resolved against live state). Ported test suite: 81 test files, **562 tests green** (command tests 1:1 with the reference; resource/action-handler/stat-calculator/modifier-deck tests; registry smoke tests). New headless integration test drives a full round (setup → characters + standee → initiative gate → draw → every figure's turn incl. undo/redo → next round → round 2 → round 3). `dart analyze` warning-free. Porting conventions in `server/PORTING.md`. Notable porting fix found by tests: removable-card physical sync had to stay gated to the ten initial counters (reference listener semantics). |
## 7. Risks and open items
@@ -327,8 +328,10 @@ changes, room sections, spectator view. *First end-to-end moment.*
Svelte. Mitigation: faithful *flows and layout*, not pixel-perfect; menus are built once
as a reusable dialog primitive.
- **Command args coverage.** Every command's constructor args must be fully serializable
- (e.g. `AddMonsterCommand` with standee selection). Discovered during Phase 1; the registry
- is the enforcement point.
+ (e.g. `AddMonsterCommand` with standee selection). Resolved in Phase 1 by the registry:
+ live-object args (loot card, ability card, character/monster lists) travel as
+ id/name/nr and are resolved against live state; enums by name; injected singletons
+ never serialize. The registry remains the enforcement point in Phase 2.
- **66 MB of images** — served statically with caching; no processing. Watch initial paint.
- **Concurrent players.** Sequential server-side execution resolves races deterministically;
the losing side gets a clear `error` (e.g. "round already drawn").