README
Brain Games
This is a set of simple command-line games written in JavaScript. The architecture of the program consists of separate modules: the core (index.js file), which implements the user interaction logic, and several games (js files in games folder), which launch and provide data to the core. Such modular layout makes it easy to add new games to the set. No need to rewrite the main logic all over again.
Installation
Execute from the terminal:
npm install -g brain-games-hexlet-tim
All ready to go now!
List of the games so far
Usage
Even Numbers
You need to ansver, is the given number even or not. Launch with:
brain-even
Calculator
You need to calculate the value of an arithmetic expression. Launch with:
brain-calc
Greatest Common Devisor
You need to determine the greatest common devisor of two given numbers. Launch with:
brain-gcd
Arithmetic Progression
You need to determine a hidden value in an arithmetic progression. Launch with:
brain-progression
Prime Numbers
You need to answer, is the given number prime or not. Launch with:
brain-prime