my-game-ks
v1.0.19
Published
Brain games package
Downloads
5
Readme
Brain games
About project
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.
Installation
npm i my-game-ks -g
Usage
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.
Example
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!
Games description
brain-even
Answer 'yes' if number is even otherwise answer 'no'
brain-calc
Find the result of the expression
brain-gcd
Find the greatest common divisor
brain-progression
Find a missing in given progression
brain-prime
Answer 'yes' if number is prime otherwise answer 'no'