Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.
/ mahjong Public archive

Implementation of riichi mahjong related stuff (hand cost, shanten, agari end, etc.)

License

Notifications You must be signed in to change notification settings

MahjongRepository/mahjong

Repository files navigation

Mahjong lib

This library can calculate hand cost (han, fu with details, yaku, and scores) for riichi mahjong (Japanese version).

Also calculating of shanten is supported.

The code was validated on tenhou.net phoenix replays in total on 11,120,125 hands.

So, we can say that our hand calculator works the same way that tenhou.net hand calculation.

How to install

pip install mahjong

Supported rules and usage examples

You can find usage examples and information about all supported rules variations in the wiki