Skip to content
Back to work

baibancount: a mahjong scorekeeper for the phone白板记账:手机上的麻将记分本

Year
2026
Status
Shipped
Outcome
Four commits in one hour and forty-six minutes, and a working scorekeeper by the end of it.

Four commits, one afternoon. baibancount takes over the arithmetic that normally falls to whoever at the table is least bad at it: tap the winner of the hand, tap the white-dragon counters up or down for each seat, and the scores settle themselves. The rules are one household's — dealer and non-dealer pay different rates, the winner takes the next deal — and they are hard-wired, so another table might not recognize the numbers.

Four tabs, nothing more: the hand in progress, rounds and who went broke, events that don't change the math but are worth keeping (preset buttons for the big hands, and one for "the whole table lost it"), and a summary with standings, deals taken, and a white-dragon leaderboard. One button at the bottom flattens the night into plain text for the group chat.

The build is as plain as it gets: a single index.html, 2,840 lines, CSS and JS inline, no build step, zero dependencies. State stays in the browser, and a small service worker caches the page and icons so the home-screen version keeps going when the wifi at the table doesn't. It's live at maxgzli.github.io/baibancount.

Two details give it away as something written against a real table. Saving a hand whose four scores don't sum to zero pops a confirmation, because that sum is exactly where a miscount shows itself. And Undo sits permanently in the footer, forty steps deep, because tapping the wrong winner is the easiest mistake to make.

All four commits landed on 8 May 2026, between 2:37 and 4:23 in the afternoon. No tests, no CI. The data never leaves the phone, so a cleared cache erases the night. Zero stars, zero issues, and no analytics on the page — whether anyone else has ever opened it, I have no way of knowing.