Skip to content

IevgeniiKozlov/brain-games

Repository files navigation

file analyze

Maintainability

Node CI

About Brain Games

This is a set of five console games based on popular mobile brain training apps. Each game asks questions that need to be answered correctly. After three correct answers, the game is considered to be completed. Wrong answers end the game and offer to play it again.

  • Calculator. Arithmetic expressions to be evaluated.
  • Progression. Finding missing numbers in a sequence of numbers.
  • Definition of an even number.
  • Finding the Greatest Common Divisor.
  • Definition of a prime number.

About project

This pet-project was created as part of the Hexlet curriculum.

Requirements

  • Node (v.13+)

Getting started

git clone https://github.com/IevgeniiKozlov/brain-games.git
cd brain-games
make install
make link

Examples

Workflow

"Even Check"

The user is shown a random number. And he needs to answer yes if the number is even, or no if it is odd.

launch: $ brain-even

asciicast

"Calculator"

The user is shown a random mathematical expression, such as 35 + 16, which must be calculated and the correct answer written down.

launch: $ brain-calc

asciicast

"NOD"

The user is shown two random numbers, for example 25 50. The user must calculate and enter the greatest common divisor of these numbers.

launch: $ brain-gcd

asciicast

"Arithmetic progression"

The user is shown a series of numbers that form an arithmetic progression, replacing any of the numbers with two points. The player must determine this number.

launch: $ brain-progression

asciicast

"Is it a prime number?"

The user is shown a random number. And he needs to answer yes if the number is prime, or no if not.

launch: $ brain-prime asciicast

Releases

No releases published

Packages

No packages published