Library for mahjong hands calculation, including hand division, shanten number, and yaku detection for Japanese mahjong. Current version: 2.0.0. Active development, irregular releases.
pip install mahjongNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic hand calculation for Japanese mahjong
Pass a Shanten instance (or the hand's shanten number) as the first argument to estimate_hand_value().
Review the new API for hand division results; refer to the updated documentation.
Use Shanten.calculate() which returns an object with the shanten number and other info.
Use a continuous string like '123m456p789s'.
Ensure the hand tiles array includes all four tiles (including the fourth tile) for kan melds.
No dependency data recorded yet.