/frontend-project-lvl1

5 simple arithmetic games in command line interface

Primary LanguageJavaScript

brain-games

Maintainability

This is the first project from Hexlet Frontend Program.

Demonstration of brain-games on Replit

Five simple CLI games:

  1. Is Number Even?
  2. Calculator
  3. Greatest Common Divisor
  4. Arithmetic Progression
  5. Is Number Prime?

Give correct answer 3 times in a row to win.

Installing:

  1. Clone this repository to your filesystem
git clone https://github.com/dpetruk/frontend-project-lvl1.git
  1. Go to the created directory named frontend-project-lvl1

  2. Create links to run games locally

npm link

If you want then to delete games just type npm unlink in the same folder.

Running:

1. Is Number Even?

Tell if a given number is even or not.

To run:

brain-even
brain-even gameplay

asciicast

2. Calculator

Calculate a given arithmetic expression.

To run:

brain-calc
brain-calc gameplay

asciicast

3. Greatest Common Divisor

Find a greatest common divisor for two numbers.

To run:

brain-gcd
brain-gcd gameplay

asciicast

4. Arithmetic Progression

Find a missing number in a given sequence.

To run:

brain-progression
brain-progression gameplay

asciicast

5. Is Number Prime?

Tell if a given number is prime or not.

To run:

brain-prime
brain-prime gameplay

asciicast