Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# mahjong

[![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).
Expand All @@ -8,39 +10,43 @@ The code was validated on tenhou.net phoenix replays in total on **11,120,125 ha

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

# How to install
## How to install

```bash
pip install mahjong
```

# Supported rules and usage examples
## 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)

# Local development setup
## Local development setup

To set up the project locally for development:

1. Clone the repository:
```bash
git clone https://github.com/MahjongRepository/mahjong.git
cd mahjong
```

```bash
git clone https://github.com/MahjongRepository/mahjong.git
cd mahjong
```

2. Setup env using [uv](https://github.com/astral-sh/uv):
```bash
uv venv
```

```bash
uv venv
```

3. Run tests to verify setup:
```bash
make tests
# Or directly:
uv run pytest
```

```bash
make tests
# Or directly:
uv run pytest
```

4. Run full checks before committing:
```bash
make check # Runs format, lint, and tests
```

```bash
make check # Runs format, lint, and tests
```