A professional-grade, colorful CLI Yahtzee game for 1-4 players
Project description
yahtzee-li (yaht-CLI)
A professional-grade, colorful CLI Yahtzee game for 1–4 players, built in Python with rich.
Features
- Full Yahtzee rule set: upper-section bonus (35 pts at ≥63), Yahtzee bonus (+100 per extra Yahtzee), and the official joker rule
- Vivid terminal UI: ASCII-art dice panels, live multi-player scorecards, and a victory screen
- 1–4 human players per game
- "Play again" prompt after each game — keep the same players or start fresh
Requirements
- Python 3.12+
uv(recommended) or any virtual-environment manager
Installation
From PyPI
pip install yahtzee-li
Or with uv:
uv tool install yahtzee-li
From source (development)
git clone https://github.com/carlmatt/yahtzee-li.git
cd yahtzee-li
uv sync
Running the game
# With uv / the project virtual environment
uv run yahtzee-li
# Or activate the venv first
source venv/bin/activate
yahtzee-li
Development
# Install dev dependencies
make install
# Run the game
make run
# Run the test suite
make test
# Run tests with coverage report
make test-cov
# Lint and format (combined)
make fix
# Lint only
make lint
# Format only
make format
# Lint + test
make check
# Remove cache and build artifacts
make clean
How to Play
- Enter the number of players (1–4) and each player's name.
- On each turn, all five dice are rolled automatically.
- After each roll you may hold any dice by entering their numbers (e.g.
1,3,5), press Enter to hold none, or enterdto skip straight to scoring. - After up to three rolls, choose a scoring category from the numbered list.
- The game runs for 13 rounds; the player with the highest grand total wins.
- Press Ctrl-C at any time to quit.
Scoring Reference
| Category | Score |
|---|---|
| Ones – Sixes | Sum of matching dice |
| Three of a Kind | Sum of all dice (if ≥3 match) |
| Four of a Kind | Sum of all dice (if ≥4 match) |
| Full House | 25 pts |
| Small Straight | 30 pts |
| Large Straight | 40 pts |
| Yahtzee | 50 pts |
| Chance | Sum of all dice |
| Upper Bonus | +35 if upper subtotal ≥ 63 |
| Yahtzee Bonus | +100 per extra Yahtzee |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yahtzee_li-0.6.1.tar.gz.
File metadata
- Download URL: yahtzee_li-0.6.1.tar.gz
- Upload date:
- Size: 42.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
417edba42a1296855d6b64d917f31823bf3440608e8511d7e3cb9aead4f8ad74
|
|
| MD5 |
c740e9fd302e71b881f78fc4c03cfb0f
|
|
| BLAKE2b-256 |
a28d8dbf6c75265c694b5708dfee82604bdad97dab6b326ebeb4bd66570391ba
|
Provenance
The following attestation bundles were made for yahtzee_li-0.6.1.tar.gz:
Publisher:
publish.yml on carlmatt/yahtzee-li
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yahtzee_li-0.6.1.tar.gz -
Subject digest:
417edba42a1296855d6b64d917f31823bf3440608e8511d7e3cb9aead4f8ad74 - Sigstore transparency entry: 1307586936
- Sigstore integration time:
-
Permalink:
carlmatt/yahtzee-li@4f294983c4237c7a69d868f6dd941a4f5c521caa -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/carlmatt
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4f294983c4237c7a69d868f6dd941a4f5c521caa -
Trigger Event:
release
-
Statement type:
File details
Details for the file yahtzee_li-0.6.1-py3-none-any.whl.
File metadata
- Download URL: yahtzee_li-0.6.1-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
999982444b32eff51b7d521688fc18de50e6c39f0805ff56b3aa0cef1699e5e8
|
|
| MD5 |
4334524f0a3086201f846d95eb672f62
|
|
| BLAKE2b-256 |
6d0f87107d17cc4e0e8cf76e2d4bd3d53cd68dd6e304c33de6642677cf76aa07
|
Provenance
The following attestation bundles were made for yahtzee_li-0.6.1-py3-none-any.whl:
Publisher:
publish.yml on carlmatt/yahtzee-li
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yahtzee_li-0.6.1-py3-none-any.whl -
Subject digest:
999982444b32eff51b7d521688fc18de50e6c39f0805ff56b3aa0cef1699e5e8 - Sigstore transparency entry: 1307587036
- Sigstore integration time:
-
Permalink:
carlmatt/yahtzee-li@4f294983c4237c7a69d868f6dd941a4f5c521caa -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/carlmatt
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4f294983c4237c7a69d868f6dd941a4f5c521caa -
Trigger Event:
release
-
Statement type: