Brain Games is a collection of simple command-line mathematical games designed as an educational project. The project is structured as a highly modular Python package, featuring a universal game engine that powers all five available games.
The project includes five brain-training games.
Rules: To win, you must provide three correct answers in a row. An incorrect answer will immediately end the game.
| Game | Description | Launch Command |
|---|---|---|
| Welcome | User greeting and introduction. | brain-games |
| Parity Check | Guess whether the number is even (yes or no). |
brain-even |
| Calculator | Calculate the result of a random mathematical expression. | brain-calc |
| GCD | Find the greatest common divisor of two numbers. | brain-gcd |
| Progression | Identify the missing number in an arithmetic progression. | brain-progression |
| Is Prime? | Guess whether the number is prime (yes or no). |
brain-prime |
The project requires Python 3.12 or newer and the uv package manager/build tool for correct installation.
To install the package as a command-line tool, you must complete the full cycle: dependency synchronization, wheel file creation, and final installation. These steps are automated by the make install-games command:
# 1. Clone the repository
# Choose one method:
# HTTPS (Universal):
git clone https://github.com/Cheshire-12/python-project-49.git
# SSH (Requires SSH key setup):
git clone [email protected]:Cheshire-12/python-project-49.git
# 2. Run the automated installation command
# Executes: uv sync, uv build, uv tool install dist/*.whl
make install-gamesImportant: After running this command, all executable scripts (e.g., brain-even, brain-calc) become available directly in your terminal without needing the uv run prefix.
You can start any game by typing its corresponding command.
brain-calc| Tool | Status |
|---|---|
| Hexlet Tests | |
| SonarCloud Quality Gate | |
| Code Smells | |
| Maintainability Rating | |
| Vulnerabilities |