Skip to content
MahjongRepositoryPublic

About

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

Topics

Resources

Contributing

Stars

492 stars

Watchers

12 watching

Forks

Repository files navigation

mahjong

PyPI License Supported Python versions PyPI Downloads Linters and tests API Docs

Japanese riichi mahjong hand calculator library.

Compute hand cost (han, fu, yaku, and scores), validate winning hands, and calculate shanten (minimum tiles to tenpai).

The code was validated on tenhou.net phoenix replays: 26,148,050 four-player and 8,406,421 three-player winning hands.

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

Documentation

How to install

pip install mahjong

Contributing

For guidance on setting up a development environment and contributing to mahjong, see Contributing to mahjong.

License

This library is licensed under the MIT license.

About

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

Topics

Resources

Contributing

Stars

492 stars

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors

Languages