Brain Games это набор мини-игр!
npm install -g games-litovsky
Как запустить: $ brain-even
Игра: "Проверка на чётность". Суть игры в следующем: пользователю показывается случайное число. И ему нужно ответить yes, если число чётное, или no — если нечётное:
Welcome to the Brain Games!
Answer "yes" if the number is even, otherwise answer "no".
May I have your name? Bill
Hello, Bill!
Question: 15
Your answer: yes
Как запустить: $ brain-calc
Игра: "Калькулятор" Суть игры в следующем: показывается случайное математическое выражение, например 35 + 16, необходимо дать правильный ответ.
Welcome to the Brain Games! What is the result of the expression?
May I have your name? Sam Hello, Sam!
Question: 4 + 10 Your answer: 14 Correct! Question: 25 - 11 Your answer: 14 Correct! Question: 25 * 7 Your answer: 175
Correct! Congratulations, Sam!
Как запустить: $ brain-gcd
Суть игры в следующем: показывается два случайных числа, например, 25 50. Вы долженф вычислить и ввести наибольший общий делитель этих чисел:
Welcome to the Brain Games! Find the greatest common divisor of given numbers.
May I have your name? Sam Hello, Sam!
Question: 25 50 Your answer: 25 Correct!
...
Congratulations, Sam!
Как запустить: $ brain-progression
Показываем ряд чисел, образующий арифметическую прогрессию, заменив любое из чисел двумя точками. Вы должены определить это число.
Welcome to the Brain Games!
What number is missing in the progression?
May I have your name? Sam
Hello, Sam
Question: 5 7 9 11 13 .. 17 19 21 23
Как запустить: $ brain-prime
Простое ли число?
Welcome to the Brain Games!
Answer "yes" if given number is prime. Otherwise answer "no".
22
yes
Correct!