Brain Games is a collection of five command-line educational games built with Node.js.
Each game presents a simple logic or math challenge. The user must give the correct answer three times in a row to win.
This project is part of the Hexlet Frontend Developer program.
- Node.js ≥ 18.x
- npm ≥ 9.x
- Unix-based OS or WSL (Windows Subsystem for Linux)
-
Clone the repository:
git clone https://github.com/katasonova/frontend-project-lvl1.git cd frontend-project-lvl1 -
Install dependencies:
npm install
-
Link the package globally:
npm link
You can launch any of the games from the terminal:
brain-even— determine if a number is evenbrain-calc— solve arithmetic expressionsbrain-gcd— find the greatest common divisorbrain-progression— find the missing number in a progressionbrain-prime— determine if a number is prime
Example:
brain-progressionIncludes both ✅ successful and ❌ failed scenarios
🔢 Brain GCD (Greatest Common Divisor):
Pull requests are welcome. Feel free to open issues or suggest improvements.
Made with ❤️ by @katasonova