/frontend-project-lvl1

A set of five console games built on the principle of popular mobile applications for brain training.

Primary LanguageJavaScript

Brain games

Hexlet tests and linter status:

Actions Status Actions Status

Brain Games - a set of 5 console games built on the principle of popular mobile brain pumping applications. Each game asks questions that need to be answered correctly. After three correct answers, it is considered that the game is over. Wrong answers complete the game and offer to go through it again.

Brain games

Installation

$ git clone git@github.com:yurykurylovich/frontend-project-lvl1.git
$ cd frontend-project-lvl1
$ npm link

Brain-games usage

$ brain-games

Welcome to the Brain Games!
May I have your name? Yury
Hello, Yury!

Brain-calc usage

$ brain-calc

Welcome to the Brain Games!
May I have your name? Yury
Hello, Yury!
What is the result of the expression?
Question: 6 - 12
Answer: -6
Correct!
Question: 2 + 17
Answer: 19
Correct!
Question: 12 * 8
Answer: 96
Correct!
Congratulations, Yury!

Brain-even usage

$ brain-even

Welcome to the Brain Games!
May I have your name? Yury
Hello, Yury!
Answer "yes" if the number is even, otherwise answer "no"
Question: 2
Answer: yes
Correct!
Question: 14
Answer: yes
Correct!
Question: 13
Answer: no
Correct!
Congratulations, Yury!

Brain-gcd usage

$ brain-gcd

Welcome to the Brain Games!
May I have your name? Yury
Hello, Yury!
Find the greatest common divisor of given numbers.
Question: 29 28
Answer: 1
Correct!
Question: 82 22
Answer: 2
Correct!
Question: 62 95
Answer: 1
Correct!
Congratulations, Yury!

Brain-prime usage

$ brain-prime

Welcome to the Brain Games!
May I have your name? Yury
Hello, Yury!
Answer "yes" if given number is prime. Otherwise answer "no".
Question: 23
Answer: yes
Correct!
Question: 50
Answer: no
Correct!
Question: 35
Answer: no
Correct!
Congratulations, Yury!

Brain-progression usage

$ brain-progression

Welcome to the Brain Games!
May I have your name? Yury
Hello, Yury!
What number is missing in the progression?
Question: 20 64 108 152 196 240 284 328 .. 416
Answer: 372
Correct!
Question: 3 39 75 111 147 183 .. 255 291 327
Answer: 219
Correct!
Question: .. 41 71 101 131 161 191 221 251 281
Answer: 30
"30" is wrong answer ;(. Correct answer was '11'.
Let's try again, Yury!

brain-even demo ( to contents )

Determination of an even number.

asciicast


brain-calc demo ( to contents )

Calculator. Arithmetic expressions to be evaluated.

asciicast


brain-gcd demo ( to contents )

Determination of the greatest common factor.

asciicast


brain-progression demo ( to contents )

Progression. Search for missing numbers in a sequence of numbers.

asciicast


brain-prime demo ( to contents )

Definition of a prime number.

asciicast