collin/mahjong
fb106be25e7b6bfef35a02ec1c8d44c2add676b6 / TODO.md
| 1 | # TODO |
| 2 | |
| 3 | Ordered by how much they'd matter at a real table. |
| 4 | |
| 5 | ## 1. Undo across a hand boundary |
| 6 | |
| 7 | `undo()` is cleared by `startHand`, so a 下一局 tapped by mistake — and that |
| 8 | button sits right under someone's thumb — cannot be taken back. The deal is |
| 9 | already reshuffled by then. Would need the snapshot from before `nextHand` kept, |
| 10 | and the seed recorded, so the same wall could be rebuilt. |
| 11 | |
| 12 | ## 2. Settings mid-game |
| 13 | |
| 14 | 設定 is reachable from the lobby and the game-over panel, but not during a 將, so |
| 15 | a player who wants to fix a typo'd name has to wait it out. The `?` panel is |
| 16 | already anchored per-seat and rotated to face its own edge; settings could share |
| 17 | that treatment. |
| 18 | |
| 19 | ## 3. 花槓 and other flower house rules |
| 20 | |
| 21 | Flowers score, but some tables pay 花槓 out the moment it completes rather than |
| 22 | at settlement, and some deal 補花 differently at the start. Both are `Rules` |
| 23 | flags plus a payment hook. |
| 24 | ## Online (new) |
| 25 | |
| 26 | - [ ] put it on a real domain: `npm run serve` behind a TLS reverse proxy |
| 27 | (phones only get camera and fullscreen on https) — anvil, a VPS, a |
| 28 | tailscale funnel, anything that terminates TLS |
| 29 | - [ ] undo online: only the party screen has it, and only while it is the |
| 30 | room's host; online games have none at all |
| 31 | - [ ] full-table online clients throw with the local gesture but others see |
| 32 | the default seat-launch animation — could send the NetThrow for those too |
| 33 | - [ ] cheat-resistance: room state carries the wall and every hand; the relay |
| 34 | is ours now, so the engine could move into `server/rooms.ts` and keep |
| 35 | secrets server-side |
| 36 | - [ ] voice/sfx settings on the phone controller (it inherits defaults, has no |
| 37 | toggle of its own) |
| 38 | |
| 39 | - [ ] make the scar bgger |
| 40 | - [ ] fgure out the br nao |
| 41 | - [ ] computer shouldn't be able to take the pung before the throw animation completes |
| 42 | - [ ] weirdness around throwing the tiles in the center, it's like attracted to the center, even gets stopped by wall it keeps going |
| 43 | - [ ] put the tumble back on a thrown tile — `TUMBLE` in `src/table/pool.ts` |
| 44 | - [ ] fake 3d for the tiles (centered around controllign players pov) |
| 45 | - [ ] consider switching physics engine to real 3d engine |