7.0.1 • Published 7 years ago

brain-games-lvl1-s89 v7.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

project-lvl1-s89

Code Climate Test Coverage Issue Count Build Status

A set of mini-games launched from the console. These games are similar to what is usually called Brain Games.

Table of Contents

Installation

  1. Install package globally npm i -g brain-games-lvl1-s89.
  2. Add folder with bin files to environment variable PATH

$ PATH=$PATH:~/<path to node>/lib/node_modules/brain-games-lvl1-s89/dist/bin/

asciicast

List of games

Greeting

Greets user

How to play

$ brain-games

Game: "Check for parity"

The essence of the game is as follows: the user is shown a random number. And he needs to answer Yes, if the number is even, or No - if odd. Any incorrect entry is considered an error, for example, n and is equivalent to an incorrect answer.

How to play

$ brain-even

asciicast

Game: "Calculator"

The essence of the game is as follows: the user is shown a random mathematical expression, for example 35 + 16, which he/she needs to calculate and write the correct answer.

How to play

$ brain-calc

Game: "The greatest common divisor (GCD)"

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

How to play

$ brain-gcd

Game: "Balance"

A balanced number is a number in which the smallest digit differs from the largest one by more than one.

Examples of balanced numbers are 111, 233, 55, 001, 9999, 0001.

And, for example, the number 123 is not balanced because the smallest digit in it is 1, and the largest one is 3, and the difference between them is 2. When balancing the numbers, "large" digits give the excess "smaller" so that the number eventually becomes Balanced. In the case of the number 123, the number 3 should give the number 1, and in the end we get the number 222.

The order of digits in a balanced number is in ascending order. For example, instead of 322 and 232, you need to specify 223.

How to play

$ brain-balance

Game: "Arithmetic progression"

The player must determine the lost number. 5 7 9 11 13 .. 17 19 21 23 Answer is 15

How to play

$ brain-progression

Game: "Is it a prime number?"

Is it a prime number?

How to play

$ brain-prime

7.0.1

7 years ago

7.0.0

7 years ago

6.0.0

7 years ago

5.2.0

7 years ago

5.1.2

7 years ago

5.1.1

7 years ago

5.1.0

7 years ago

5.0.0

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago

3.0.1

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago