@nekobato/solitaire
v0.1.0
Published
TUI Solitaire for the terminal
Downloads
79
Maintainers
Readme
@nekobato/solitaire
A terminal UI (TUI) solitaire you can play in the terminal. Supports Klondike and FreeCell.
# Klondike
npx @nekobato/solitaire# FreeCell
npx @nekobato/solitaire --game freecellOverview
- Requires Node.js >= 18
- Terminal UI built with blessed
- Reproducible shuffles via seed
- Supports color themes and compact rendering
Usage
Play
npx @nekobato/solitaireRun locally:
git clone https://github.com/nekobato/solitaire-cli.git
npm install
npm run startCompact Mode
Add option -compact to play compact mode.
Options
Use --help to see the latest option list and available themes.
npx @nekobato/solitaire --help| Option | Description |
| ----------------------------- | ------------------------------------------ |
| --game <klondike\|freecell> | Select game (default: klondike) |
| --draw <1\|3> | Draw count (Klondike only, default: 1) |
| --seed <number> | Deterministic shuffle seed |
| --no-color | Disable ANSI colors |
| --compact | Use compact card rendering |
| --theme <name> | Select color theme (see --help for list) |
| --help, -h | Show help |
| --version, -v | Print version |
| --smoke | Run a smoke test and exit |
Examples
# Start FreeCell
npx @nekobato/solitaire --game freecell
# Start Klondike with a fixed seed and draw 3
npx @nekobato/solitaire --seed 42 --draw 3Contributing
- Fork the repository and create a feature branch
- Install dependencies
- Make changes, then run formatting and tests
npm install
npm run format
npm run testLicense
MIT License
