No description
- TypeScript 99.2%
- HTML 0.8%
| packages | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc | ||
| bun.lock | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
🎳 Bowling 🎳
A terminal-based bowling scorekeeper built with Bun, featuring both CLI and TUI interfaces.
Project Structure
This is a monorepo with the following packages:
- @bowling/core - Core bowling logic and utilities (scoring, rules, validation)
- @bowling/cli - Command-line interface for recording games
- @bowling/tui - Terminal user interface built with Ink/React
- @bowling/web - Web-based interface
Installation
bun install
Usage
CLI
Run the CLI tool with roll values:
bun run cli 5 3 7 2 10 4 6 8 1 9
┌─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬─────┐
│ │5 3│ │7 2│ │X │ │4 /│ │8 1│ │9 │ │ │ │ │ │ │ │ │
│ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └─────┤
│ 8│ 17│ 37│ 55│ 64│ 73│ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴───────┘
Score multiple games:
bun run cli 10 5 3 7 3 4 6 7 -- 2 8 10 3 4 6 4 5
┌─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬─────┐
│ │X │ │5 3│ │7 /│ │4 /│ │7 │ │ │ │ │ │ │ │ │ │ │
│ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └─────┤
│ 18│ 26│ 40│ 57│ 64│ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴───────┘
┌─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬─────┐
│ │2 /│ │X │ │3 4│ │6 /│ │5 │ │ │ │ │ │ │ │ │ │ │
│ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └─────┤
│ 20│ 37│ 44│ 59│ 64│ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴───────┘
Score multiple games:
bun run cli --Alice 10 5 3 7 3 4 6 7 --Bob 2 8 10 3 4 6 4 5
┌─────┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬─────┐
│ │ │X │ │5 3│ │7 /│ │4 /│ │7 │ │ │ │ │ │ │ │ │ │ │
│ │ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └─────┤
│Alice│ 18│ 26│ 40│ 57│ 64│ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴───────┘
┌─────┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬───┬─┬─────┐
│ │ │2 /│ │X │ │3 4│ │6 /│ │5 │ │ │ │ │ │ │ │ │ │ │
│ │ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └───┤ └─────┤
│ Bob│ 20│ 37│ 44│ 59│ 64│ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴───────┘
TUI
Start the terminal user interface:
bun run dev:tui
Development
Run tests:
bun test
Format code:
bun run format
Check formatting:
bun run format:check
Build all packages:
bun run build
Features
- Accurate bowling scoring with strike and spare handling
- Frame-by-frame breakdown display
- Multiple player support via
--nameflag - Clean terminal interface
License
MIT