Skip to content

Yekku/brain-games

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brain Games

CI Maintainability

Welcome to the First Brain Games!

A terminal game that consists of different maths tasks.

Requirements

Node.js >= 18.0.0

Installation

npm i -g first-brain-games

Available Games

  1. brain-even
  2. brain-calc
  3. brain-gcd
  4. brain-balance
  5. brain-progression
  6. brain-prime
  7. brain-fibonacci
  8. brain-sqrt
  9. brain-binary

You can call the menu via brain-game or npm start.

To immediately start a specific game without the menu, use its name directly (e.g. brain-even).

Development

make install          # Install dependencies
make lint             # Run ESLint
make start            # Launch main menu
make start-even       # Launch even game
make start-calc       # Launch calc game
make start-gcd        # Launch gcd game
make start-balance    # Launch balance game
make start-progression # Launch progression game
make start-prime      # Launch prime game
make start-fibonacci  # Launch fibonacci game
make start-sqrt       # Launch sqrt game
make start-binary     # Launch binary game
make publish          # Publish to npm

asciicast

Games

  • Even game — You are shown a random number. Answer yes if it is even, no if it is odd.

    brain-even

    asciicast

  • Calc game — Solve a random arithmetic expression using +, -, or *. Type the result.

    brain-calc

    asciicast

  • GCD game — Two numbers are shown. Find their greatest common divisor.

    brain-gcd

    asciicast

  • Balance game — Rearrange the digits of a number so that the difference between the largest and smallest digit is at most 1.

    brain-balance

    asciicast

  • Progression game — An arithmetic sequence is shown with one number replaced by ... Find the missing number.

    brain-progression

    asciicast

  • Prime game — You are shown a number. Answer yes if it is prime, no otherwise. A prime number is greater than 1 and divisible only by 1 and itself.

    brain-prime

    asciicast

  • Fibonacci game — You are shown a number. Answer yes if it belongs to the Fibonacci sequence (1, 1, 2, 3, 5, 8, 13, 21, ...), no otherwise.

    brain-fibonacci
  • Square root game — You are shown a perfect square. Find its integer square root.

    brain-sqrt
  • Binary game — You are shown a decimal number. Convert it to its binary representation.

    brain-binary

About

First Brain Games

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors