Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Sinoptik93/frontend-project-lvl1

Repository files navigation

Project I | Hexlet "Brain games" | Frontend

Maintainability Node CI Build

Description

Set from 5 console games:

  1. Brain-even
  2. Brain-calc
  3. Brain-GCD
  4. Brain-progression
  5. Brain-prime

Installing

Before installing you need to required in install of Node.js and NPM. Check in your console next command:

$ node -v

and

$ npm -v

you must have version for Node.js (example v13.7.0) and NPM (example 6.13.7). If you don't, make next steps.

Node.js

For Linux and Mac OS:

Installing Node.js by typing:

$ [sudo] apt install nodejs -g  
//atribute "-g" means global

or download binaries and check $ node -v in console.

For Windows

Download installer and install this distributive and check $ node -v in console.

NPM

NPM must be installed with Node.js, but

Installing game package

  1. Choose directory for installing binaries and make next: *recomended
$ npm install git+ssh://[email protected]:Sinoptik93/frontend-project-lvl1.git

or without SSH:

$ npm instal git+https://github.com/Sinoptik93/frontend-project-lvl1
  1. next make binaries links in system
$ npm link

you must get the following lines:

frontend-project-lvl1$ npm link
audited 474 packages in 5.09s

17 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

/usr/local/bin/brain-calc -> /usr/local/lib/node_modules/brain-games-jan2020/bin/brain-calc.js
/usr/local/bin/brain-even -> /usr/local/lib/node_modules/brain-games-jan2020/bin/brain-even.js
/usr/local/bin/brain-gcd -> /usr/local/lib/node_modules/brain-games-jan2020/bin/brain-gcd.js
/usr/local/bin/brain-progression -> /usr/local/lib/node_modules/brain-games-jan2020/bin/brain-progression.js
/usr/local/bin/brain-prime -> /usr/local/lib/node_modules/brain-games-jan2020/bin/brain-prime.js
/usr/local/bin/brain-games -> /usr/local/lib/node_modules/brain-games-jan2020/bin/brain-games.js
/usr/local/lib/node_modules/brain-games-jan2020 -> /home/sinner/git/Hexlet/frontend-project-lvl1
  1. installing with npm publish:

Game "Brain-even"

About

Your target - is to determine the random number: even or not.

*You can adjust the difficulty by changing the configuration parameters in src/games/even.js -> Section // CONFIGURATION //

Launch game

Input next command to launch game:

$ brain-even

Game "Brain-calc"

About

Remember school arithmetic and show your brilliant knowledges by counting random expressions! *You can adjust the difficulty by changing the configuration parameters in src/games/calc.js -> Section // CONFIGURATION //

Launch game

$ brain-calc

Game "Brain-GCD"

About

Find the greatest common divisor for two random numbers.

*You can adjust the difficulty by changing the configuration parameters in src/games/gcd.js -> Section // CONFIGURATION //

Launch game

$ brain-gcd

Game "Brain-progression"

About

Write a missing number in increasing progression.

*You can adjust the difficulty by changing the configuration parameters in src/games/progression.js -> Section // CONFIGURATION //

Launch game

$ brain-progression

Game "Brain-prime"

About

You need to answer the question: is the current random number prime?

*You can adjust the difficulty by changing the configuration parameters in src/games/prime.js -> Section // CONFIGURATION //

Launch game

$ brain-prime