Command-line SQUABBLE — a familiar-seeming but legally distinct word game
Project description
Python command-line SQUABBLE
A familiar-seeming but legally distinct word game for the terminal: local hot-seat play or computer opponents that search the move space each turn.
Requirements
- Python 3.12+
- uv (recommended) or pip
Setup
From the repository root:
uv sync
Or with pip:
python3 -m pip install -e .
Copy .env.example to .env if you need to override where data files live (see Data files below).
Data files
Dictionary and tile data are loaded from the directory pointed to by DATA_ROOT. If unset, it defaults to game/data next to the installed package (the usual layout in this repo).
You can set DATA_ROOT in a .env file at the project root (loaded automatically via python-dotenv) or export it in your shell.
Run the game
uv run squabble
uv run squabble <human_players> <computer_players>
Or:
python3 -m game
python3 game_manager.py
Moves (human)
quit— leave the gameskip— pass the turnexchange <LETTERS>— trade tiles (when bag rules allow)define <WORD>— look up a definition (when available)<x> <y> <R|D> <WORD>— play at columnx, rowy, direction right or down (coordinates use the same hex digit column headers as the printed board)
Development
uv run pytest
uv run mypy game tests
Type checking targets the game package and tests with strict defaults (pyproject.toml).
Layout
game/cli.py— entry point and argument parsinggame/board.py— board stategame/rulebook.py— dictionary, scoring, validationgame/tile_bag.py— tile poolgame/game_master.py— turn loop and scoringgame/players/— human and computer playersgame/ui/— rendering, panels, and display logic (includes deliberate animation delays for readability)game/paths.py—DATA_ROOT/data_path()game/types.py— shared type definitionstests/— pytest suite
The AI move search is fast enough that two computer players can complete multiple full games per second when run without the UI layer.
Credits
- Word definitions sourced via the Free Dictionary API
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 squabble_game-0.1.0.tar.gz.
File metadata
- Download URL: squabble_game-0.1.0.tar.gz
- Upload date:
- Size: 6.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ed224bd0a3d58e35f166d74d8aa8aa99af002cab166f5aef479cb9675b53cf8
|
|
| MD5 |
f1874e87324484023c3e2ee1fb0c1bba
|
|
| BLAKE2b-256 |
1aa04421724a9f8c2492391cdcdd01a5a9e5f31a49245bf7b15d71f8028698a7
|
Provenance
The following attestation bundles were made for squabble_game-0.1.0.tar.gz:
Publisher:
release.yml on klingj3/squabble-word-game
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
squabble_game-0.1.0.tar.gz -
Subject digest:
1ed224bd0a3d58e35f166d74d8aa8aa99af002cab166f5aef479cb9675b53cf8 - Sigstore transparency entry: 1624327085
- Sigstore integration time:
-
Permalink:
klingj3/squabble-word-game@9ef09ca8309c16b0074d73d5eda6f6a9b2564693 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/klingj3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9ef09ca8309c16b0074d73d5eda6f6a9b2564693 -
Trigger Event:
push
-
Statement type:
File details
Details for the file squabble_game-0.1.0-py3-none-any.whl.
File metadata
- Download URL: squabble_game-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49a74cce29cefcf769ce1a806405866686f991d5edec89477c2f54800886915f
|
|
| MD5 |
da5729079fd49f4310e4753b2501abe6
|
|
| BLAKE2b-256 |
84583a7bf3c1a3bece6fc008d95e3a1120a48e3bea662d59398d6082ed8710cf
|
Provenance
The following attestation bundles were made for squabble_game-0.1.0-py3-none-any.whl:
Publisher:
release.yml on klingj3/squabble-word-game
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
squabble_game-0.1.0-py3-none-any.whl -
Subject digest:
49a74cce29cefcf769ce1a806405866686f991d5edec89477c2f54800886915f - Sigstore transparency entry: 1624327095
- Sigstore integration time:
-
Permalink:
klingj3/squabble-word-game@9ef09ca8309c16b0074d73d5eda6f6a9b2564693 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/klingj3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9ef09ca8309c16b0074d73d5eda6f6a9b2564693 -
Trigger Event:
push
-
Statement type: