Adds the multiplayer functionality the user requested:
- LobbyRoomList UI component (create / list / join via boardgame.io's
built-in Lobby REST API). Credentials are server-issued; no more hardcoded
p0/p1 in OnlineConfig.
- LobbyClient re-export wrapper in @tts-like/engine (typed factory
createLobbyClient).
- CORS origin default: dev-friendly regex list (boardgame.io's
isOriginAllowed treats literal '*' as exact-match, which silently blocks
everything; we now use RegExp matching localhost + Tauri schemes).
- War shuffle accepts an injected random fn so unit tests are deterministic;
fixed a tie-handling bug where piles were cleared without redistributing
cards (now piles stay on tie for a "war" round).
- Engine unit tests (vitest + Local master for 2-client sync):
packages/engine/src/games/{drag-test,war,mill}.test.ts (34 cases)
- Server REST tests (vitest + supertest, port 0 random):
packages/server/src/server.test.ts (9 cases)
- Playwright E2E (apps/web/e2e/*): 3 specs covering create → join →
sync for War / DragTest / Mill across two browser contexts.
- Dockerfile fix: pnpm deploy --prod leaves boardgame.io as a symlink to
.pnpm/boardgame.io@…; copy -rL materialises the dist so the runtime
image can resolve boardgame.io/server.
- Root scripts: dev:server, test:e2e, verify (ts + test + e2e).
2.3 KiB
2.3 KiB