https://github.com/MahjongRepository/mahjong
Implementation of riichi mahjong related stuff (hand cost, shanten, agari end, etc.)
https://github.com/MahjongRepository/mahjong
game-development japanese mahjong riichi riichi-mahjong
Last synced: about 1 month ago
JSON representation
Implementation of riichi mahjong related stuff (hand cost, shanten, agari end, etc.)
- Host: GitHub
- URL: https://github.com/MahjongRepository/mahjong
- Owner: MahjongRepository
- License: mit
- Archived: true
- Created: 2017-09-20T09:31:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T17:38:50.000Z (about 1 year ago)
- Last Synced: 2024-10-03T00:09:46.537Z (8 months ago)
- Topics: game-development, japanese, mahjong, riichi, riichi-mahjong
- Language: Python
- Homepage:
- Size: 400 KB
- Stars: 379
- Watchers: 15
- Forks: 39
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://github.com/MahjongRepository/mahjong/actions/workflows/lint_and_test.yml)
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
```bash
pip install mahjong
```# Supported rules and usage examples
You can find usage examples and information about all supported rules variations in the [wiki](https://github.com/MahjongRepository/mahjong/wiki)