The classic casino experience, re-engineered for the command line.
A feature-rich Python application that combines a beautiful terminal UI with serious functionality. Includes multi-user profile management, auto-backups to prevent data loss, and an integrated Trivia Engine to earn in-game currency. Built to prove that terminal apps can be as beautiful as they are functional.
Key Engineering Highlights:
- Modern TUI: Built with Rich and Questionary for a polished visual experience.
- Robust Save System:
- Multi-User Support: Create separate profiles for different players.
- Auto-Save: Progress is saved automatically after every round.
- Smart Backups: Timestamped backups allow you to restore previous sessions.
- Trivia Mode: running low on cash? Earn free chips by answering trivia questions!
- General Knowledge: Built-in questions.
- Custom Topics: add your own JSON quizzes.
- CLI Power: Manage game data directly from the terminal.
- Distribution: Full
pipinstallable package structure.
-
Clone the repository:
git clone https://github.com/szxivk/Terminal-Blackjack.git cd Terminal-Blackjack -
Install the package:
pip install .(Note: Need to setup a virtual env first)
Once installed, you can launch the game from anywhere in your terminal:
pybjack- Start Game:
pybjack - Help:
pybjack -help(Show all available commands) - Reset Data:
pybjack -reset(Wipes all saves and settings) - Uninstall:
pybjack -remove(Clean uninstallation, optionally keeps saves)
- Objective: Beat the dealer's hand without going over 21.
- Unlocks:
- Earn Chips: Answer trivia questions to build your bankroll.
- Controls:
- Use Arrow Keys (↑/↓) to navigate menus.
- Press Enter to select.
You can add your own trivia questions!
- Navigate to
~/.terminal_blackjack/questions/. - Create a new JSON file (e.g.,
history.json). - Format it like this:
{ "topic": "History", "questions": [ { "question": "Who was the first US President?", "options": ["Lincoln", "Washington", "Jefferson", "Adams"], "correct_index": 1 } ] } - Launch the game, go to Earn Chips > Custom MCQs, and select your topic!
- Local Only: All data (chips, saves, sessions) is stored locally on your machine. No data is sent to any external server.
All game data is stored securely in your home directory:
~/.terminal_blackjack/ - Open Source: The code is fully transparent and open source.
by szxivk

