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.
- Python 3.12+
- uv (recommended) or pip
From the repository root:
uv syncOr 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).
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.
uv run squabble
uv run squabble <human_players> <computer_players>Or:
python3 -m game
python3 game_manager.pyquit— 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)
uv run pytest
uv run mypy game testsType checking targets the game package and tests with strict defaults (pyproject.toml).
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.
- Word definitions sourced via the Free Dictionary API
