Brain games is a pack of console mini-games which were developed while passing hexlet.io project courses. Each game is unique and started via game engine. Mini-games are modular so you can add your own mini-game.
npm i my-game-ks -g
To start the game type brain-{gamename}
in the terminal.
There are 6 different games in v1.0.16:
- brain-even
- brain-calc
- brain-gcd
- brain-progression
- brain-prime
All the games have similar flow:
- Welcome screen and name prompt
- Question
- Your Answer
Game continues up to 3 correct answers. If you give a wrong answer the game is finished.
kirill$ brain-even
Welcome to the Brain Games!
Answer "yes" if number even otherwise answer "no".
May I have your name? Kirill
Hello, Kirill!
Question: 44
Your answer: yes
Correct!
Question: 76
Your answer: yes
Correct!
Question: 42
Your answer: yes
Correct!
Congratulations, Kirill!
Answer 'yes' if number is even otherwise answer 'no'
Find the result of the expression
Find the greatest common divisor
Find a missing in given progression
Answer 'yes' if number is prime otherwise answer 'no'