Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

        

[![Mahjong lib](https://github.com/MahjongRepository/mahjong/actions/workflows/lint_and_test.yml/badge.svg)](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)