Baibanzhishen: a scorekeeper for my own mahjong table白板之神:给自家牌桌写的麻将计分器
- Year
- 2026
- Status
- Shipped
- Outcome
- Three pen strokes log a hand; the iOS build is on the App Store.
Three pen strokes record a hand: circle the winner's quadrant, write how many white dragons they drew, write the multiplier in the middle. Lift the pen, confirm, done. Baibanzhishen is a scorekeeper for in-person Hangzhou mahjong: one phone, one recorder, four players settled automatically, the dealer seat moving on its own, standings at the end of the night. Past a one-time download of the handwriting model it runs offline, no account, no money — it tracks points, never debts. The name comes from a local quirk: the white dragon tile is wild but never enters the scoring math. So the app counts it obsessively anyway, purely to crown whoever ends the night holding the most.
The previous scorekeeper took four taps per hand, too slow to keep up with a real table. Recognition was the one thing that could sink the replacement, so it was tested before a single screen was designed: a throwaway app containing nothing but the recognizer, installed on a real iPhone, digits 0 through 9 written three times each, 30 for 30. The handoff doc opens with the rule — do not spec the input screen until this passes, or you will be guessing and rewriting. That ordering matters more to me than the result.
The iOS build is finished: seating, the four-quadrant mat, handwriting or button entry, a per-hand log, undo and edit-any-hand with the dealer chain and every later score recomputed, trend charts, a title board. The local database is on its fifth schema, each with a migration, so old sessions survive upgrades. 189 Flutter tests plus 57 for the mini program, green locally and in CI. Version 1.0.0+3, carrying the release icon and display name, is on the App Store.
The WeChat mini program is not a port. Mini programs have no offline recognition, so entry became tapping the winner and dialing the multiplier on the table view. Its real reason to exist is the other three players: scan in, watch your own score move live, the grid rotated so you always sit bottom right. That part is unbuilt. The rules engine and all seven screens work and a whole night runs standalone, but cloud storage and live updates were never wired, so the data still lives on the recorder's phone.
Almost everything here grew out of the table. Someone busts and the table redraws seats, so there is "new seats, new round": seating resets, the dealer starts over, scores keep accumulating, and every past hand is mapped back to wherever that player sat at the start. A house penalty arrived the same way: if the dealer's opening discard goes around uncalled, dice decide what they owe each of the other three. 55 of the 65 commits say they were written with Claude. I am a PM, not an engineer, and this is the furthest I have carried anything from idea to submission.