first-brain-games
v2.1.0
Published
Console mini brain games
Readme
Brain Games
Welcome to the First Brain Games!
A terminal game that consists of different maths tasks.
Requirements
Node.js >= 18.0.0
Installation
npm i -g first-brain-gamesAvailable Games
- brain-even
- brain-calc
- brain-gcd
- brain-balance
- brain-progression
- brain-prime
- brain-fibonacci
- brain-sqrt
- brain-binary
You can call the menu via brain-game or npm start.
To immediately start a specific game without the menu, use its name directly (e.g. brain-even).
Development
make install # Install dependencies
make lint # Run ESLint
make start # Launch main menu
make start-even # Launch even game
make start-calc # Launch calc game
make start-gcd # Launch gcd game
make start-balance # Launch balance game
make start-progression # Launch progression game
make start-prime # Launch prime game
make start-fibonacci # Launch fibonacci game
make start-sqrt # Launch sqrt game
make start-binary # Launch binary game
make publish # Publish to npmGames
Even game — You are shown a random number. Answer
yesif it is even,noif it is odd.brain-evenCalc game — Solve a random arithmetic expression using
+,-, or*. Type the result.brain-calcGCD game — Two numbers are shown. Find their greatest common divisor.
brain-gcdBalance game — Rearrange the digits of a number so that the difference between the largest and smallest digit is at most 1.
brain-balanceProgression game — An arithmetic sequence is shown with one number replaced by
... Find the missing number.brain-progressionPrime game — You are shown a number. Answer
yesif it is prime,nootherwise. A prime number is greater than 1 and divisible only by 1 and itself.brain-primeFibonacci game — You are shown a number. Answer
yesif it belongs to the Fibonacci sequence (1, 1, 2, 3, 5, 8, 13, 21, ...),nootherwise.brain-fibonacciSquare root game — You are shown a perfect square. Find its integer square root.
brain-sqrtBinary game — You are shown a decimal number. Convert it to its binary representation.
brain-binary







