anvilsign in

collin/mahjong

BoardRenderedSource

TODO

Ordered by how much they'd matter at a real table.

1. Undo across a hand boundary

undo() is cleared by startHand, so a 下一局 tapped by mistake — and that button sits right under someone's thumb — cannot be taken back. The deal is already reshuffled by then. Would need the snapshot from before nextHand kept, and the seed recorded, so the same wall could be rebuilt.

2. Settings mid-game

設定 is reachable from the lobby and the game-over panel, but not during a 將, so a player who wants to fix a typo'd name has to wait it out. The ? panel is already anchored per-seat and rotated to face its own edge; settings could share that treatment.

3. 花槓 and other flower house rules

Flowers score, but some tables pay 花槓 out the moment it completes rather than at settlement, and some deal 補花 differently at the start. Both are Rules flags plus a payment hook.

Online (new)

  • put it on a real domain: npm run serve behind a TLS reverse proxy (phones only get camera and fullscreen on https) — anvil, a VPS, a tailscale funnel, anything that terminates TLS

  • undo online: only the party screen has it, and only while it is the room's host; online games have none at all

  • full-table online clients throw with the local gesture but others see the default seat-launch animation — could send the NetThrow for those too

  • cheat-resistance: room state carries the wall and every hand; the relay is ours now, so the engine could move into server/rooms.ts and keep secrets server-side

  • voice/sfx settings on the phone controller (it inherits defaults, has no toggle of its own)

  • make the scar bgger

  • fgure out the br nao

  • computer shouldn't be able to take the pung before the throw animation completes

  • weirdness around throwing the tiles in the center, it's like attracted to the center, even gets stopped by wall it keeps going

  • put the tumble back on a thrown tile — TUMBLE in src/table/pool.ts

  • fake 3d for the tiles (centered around controllign players pov)

  • consider switching physics engine to real 3d engine