lightmonk1911/project-lvl1-s320

View on GitHub
README.md

Summary

Maintainability
Test Coverage
# The brain-games
Here you can find a small kit of games you can play with console. 
1. [Is number even?](#even)
2. [Calculate the value of the expression.](#calculator)
3. [Find greater common divisor of two numbers.](#greater-common-divisor)
4. [Balance the number.](#balance)
5. [Insert the missing number in arithmetic progression.](#progression)
6. [Is number prime?](#prime)

[![Maintainability](https://api.codeclimate.com/v1/badges/9a33fa847d65a32ef1bd/maintainability)](https://codeclimate.com/github/lightmonk1911/project-lvl1-s320/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/9a33fa847d65a32ef1bd/test_coverage)](https://codeclimate.com/github/lightmonk1911/project-lvl1-s320/test_coverage)
[![Build Status](https://travis-ci.org/lightmonk1911/project-lvl1-s320.svg?branch=master)](https://travis-ci.org/lightmonk1911/project-lvl1-s320)

## Install

```bash
$ npm install -g hexlet_pr_1_second_attempt
```
### Even
This is the simpliest game in this collection. Just for start.
Let's check if you know how to recognize even number:)
```bash
$ brain-even
```
![screencast from game](img/even.gif)

[Get back to contents](#the-brain-games)
### Calculator
Everything is comletely simple. Just calculate it. 
P.S. It was joke about simple:)
```bash
$ brain-calc
```
![screencast from game](img/calc.gif)

[Get back to contents](#the-brain-games)
### Greater common divisor
Did you like math in your childhood? Here you have to remember what is greater common divisor.
```bash
$ brain-gcd
```
![screencast from game](img/gcd.gif)

[Get back to contents](#the-brain-games)
### Balance
Balance the given number. Number is balanced when the difference between biggest and smallest digit of number is less than 2. To balance number we take 1 from biggest and give it to smallest digit and repeat while number is unbalanced. After that you should sort digits of number and enter your answer.
For example 2691 => 2682 => 2673 => 3663 => 4563 => 4554 => 4455.
It's more difficult to explain than to resolve.
```bash
$ brain-balance
```
![screencast from game](img/balance.gif)

[Get back to contents](#the-brain-games)
### Progression
Find missing number. Without calculator. It's brain games, not finger training.
```bash
$ brain-progression
```
![screencast from game](img/progression.gif)

[Get back to contents](#the-brain-games)
### Prime
Prime numbers has two different natural divisors. No less, no more. Use tips from school. Build new neural connections in your intraparietal sulcus(or somewhere else).
```bash
$ brain-prime
```
![screencast from game](img/prime.gif)

[Get back to contents](#the-brain-games)