Mahjong Scoring API
Riichi (Japanese) mahjong scoring as an API, computed locally and deterministically and exactly — the points a winning hand pays, straight from the scoring table, not a lookup you have to memorise. The score endpoint turns han and fu into the payment using base = fu × 2^(2 + han): a ron pays base × 4 (a dealer ron × 6) rounded up to the nearest 100, while a tsumo splits base × 2 from the dealer and base × 1 from each non-dealer (a dealer tsumo takes base × 2 from all three) — so a non-dealer 3 han 30 fu ron is 3,900, a 4 han 30 fu is 7,700, and a non-dealer mangan ron is 8,000. The limit endpoint classifies a hand: mangan (5 han, or 3–4 han where the fu pushes the base to 2,000), haneman (6–7), baiman (8–10), sanbaiman (11–12) and yakuman (13+), with the base points behind each. The honba endpoint adds the table bonuses — 300 per honba counter and 1,000 per riichi stick — on top of the won hand. Everything is computed locally and deterministically, so it is instant and exact. Ideal for mahjong apps, online-table and scorekeeper tools, club and tournament software, and learning aids. Pure local computation — no key, no third-party service, instant. Exact scoring-table maths. Live, nothing stored. 3 compute endpoints. Japanese riichi rules; other variants (MCR, Hong Kong) score differently.
api.oanor.com/mahjong-api