npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@leusmaximus/brain-games

v0.1.19

Published

During the project it is necessary to implement a set of mini-games that are launched from the console. These games are similar to what is commonly called "Brain Games".

Downloads

61

Readme

Maintainability Build Status

Brain Games

Brain Games this is a set of mini-games that are launched from the console. These games are similar to what is commonly called "Brain Games".

Installation

npm i -g @leusmaximus/brain-games

After the installation, commands starting with the brain-<game name> will be available in your console.

Usage

This module includes such games:

Brain Balance

The game "Balance the given number". A balanced number is a number in which the smallest digit differs from the largest one by more than one. The user must calculate and enter the balanced number.

Example:

$ brain-balance

Welcome to the Brain Game!
Balance the given number.

May I have your name? Max
Hello, Max!

Question: 215
Your answer: 233
Correct!
Question: 4181
Your answer: 3344
Correct!
Question: 355
Your answer: 445
Correct!
Congratulations, Max!

Demo

Brain Calc

Game "Calculator". The essence of the game is as follows: the user is shown a random mathematical expression, for example 35 + 16, which you need to calculate and write the correct answer.

Example:

$ brain-calc

Welcome to the Brain Games!
What is the result of the expression?

May I have your name? Max
Hello, Max!

Question: 4 + 10
Your answer: 14
Correct!
Question: 25 - 11
Your answer: 14
Correct!
Question: 25 * 7
Your answer: 175
Correct!
Congratulations, Max!

Demo

Brain Even

The 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.

Example:

$ brain-even

Welcome to the Brain Games!
Answer "yes" if number even otherwise answer "no".

May I have your name? Max
Hello, Max!

Question: 15
Your answer: no
Correct!
Question: 6
Your answer: yes
Correct!
Question: 7
Your answer: no
Correct!
Congratulations, Max!

Demo

Brain gcd

The 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.

Example:

$ brain-gcd

Welcome to the Brain Games!
Find the greatest common divisor of given numbers.

May I have your name? Max
Hello, Max!

Question: 25 50
Your answer: 25
Correct!
Question: 100 52
Your answer: 4
Correct!
Question: 3 9
Your answer: 3
Correct!
Congratulations, Max!

Demo

Brain Prime

The game "Is Prime". A prime number is a whole number greater than 1 whose only factors are 1 and itself. The user must to answer yes, if the number is prime, or no - if not.

Example:

$ brain-prime

Welcome to the Brain Games!
Answer "yes" if number is prime otherwise answer "no".

May I have your name? Max
Hello, Max!

Question: 17
Your answer: yes
Correct!
Question: 21
Your answer: no
Correct!
Question: 113
Your answer: yes
Correct!
Congratulations, Max!

Demo

Brain Progression

We show the player a series of numbers, forming an arithmetic progression, replacing any of the numbers with two points. The player must determine this number.

Example:

$ brain-progression

Welcome to the Brain Games!
What number is missing in this progression?.

May I have your name? Max
Hello, Max!

Question: 5 7 9 11 13 .. 17 19 21 23
Your answer: 15
Correct!

...

Congratulations, Max!

Demo