Skip to content

Project "Brain games" (Hexlet's educational project - a set of five console games)

Notifications You must be signed in to change notification settings

Teihden/frontend-project-44

Repository files navigation

Project "Brain games"

Actions Status Maintainability

About

"Brain games" is a set of five console games based on the popular mobile brain-pumping apps. Each game asks questions that need to be answered correctly. After three correct answers, the game is considered completed. Incorrect answers end the game and prompt you to play it again.

Games:

  1. "Checking Parity"
  2. "Calculator"
  3. "Greatest common divisor (GCD)"
  4. "Arithmetic progression"
  5. "Is it a prime number?"

Usage

You should have Node.js installed before proceeding. Only test JS against v19 and on macOS.

# Clone the repo
git clone https://github.com/Teihden/frontend-project-44
cd frontend-project-44

# Install dependencies
make install

# Run each game separately
make brain-even
make brain-calc
make brain-gcd
make brain-progression
make brain-prime

CLI

# Run package
make brain-games

# Runs npm-publish with flag (--dry-run)
make publish

# Runs Eslint against source code for quality
make lint

Brain-even (game: "Checking Parity")

The essence of the game is this: the user is shown a random number. And he has to answer 'yes' if the number is even, or 'no' if it is odd. In case the user gives the wrong answer, the game ends. You must give the correct answer to three questions in a row.

asciicast

Brain-calc (game: "Calculator")

The essence of the game is this: the user is shown a random mathematical expression, such as 35 + 16, which must be calculated and write down the correct answer.

asciicast

Brain-gcd (game: "Greatest common divisor (GCD)")

The essence of the game is as follows: two random numbers is shown, for example, 25 50. You must calculate and enter the greatest common divisor of these numbers.

asciicast

Brain-progression (game: "Arithmetic progression")

Show the player a series of numbers that form an arithmetic progression, replacing any of the numbers with two dots. The player must determine that number. The length can be generated randomly, but contains no less than 5 and no more than 10 numbers.

asciicast

Brain-prime (game: "Is it a prime number?")

The essence of the game is this: the user is shown a random number. And he has to answer 'yes' if the number is prime, or 'no' if it is not.

asciicast

About

Project "Brain games" (Hexlet's educational project - a set of five console games)

Topics

Resources

Stars

Watchers

Forks