@xyzblocks/distributed-fizz-buzz

1.0.2 • Public • Published

Distributed Fizz Buzz

Fizz Buzz ?

"Fizz buzz is a group word game for children to teach them about division. Players take turns to count incrementally, replacing any number divisible by three with the word "fizz", and any number divisible by five with the word "buzz"." ~ Wikipedia

Simple Implementation of Fizz Buzz

for (let value = 0; value < 100; value++) {
  const fizz: boolean = value % 3 === 0;
  const buzz: boolean = value % 5 === 0;
  const fizzBuzz: boolean = fizz && buzz;

  if (fizzBuzz) {
    console.log('fizz buzz');
    continue;
  } else if (fizz) {
    console.log('fizz');
    continue;
  } else if (buzz) {
    console.log('buzz');
    continue;
  } else {
    console.log(value.toString());
    continue;
  }
}

What is Distributed Fizz Buzz ?

Coming Soon

Getting Started

Installation

npm install -g @xyzblocks/distributed-fizz-buzz

Running on Local Machine

distributed-fizz-buzz --host 127.0.0.1 --port 8081 --nodes 127.0.0.1:8081,127.0.0.1:8082

distributed-fizz-buzz --host 127.0.0.1 --port 8082 --nodes 127.0.0.1:8081,127.0.0.1:8082

Screenshot

Readme

Keywords

none

Package Sidebar

Install

npm i @xyzblocks/distributed-fizz-buzz

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

53.4 kB

Total Files

47

Last publish

Collaborators

  • xyzblocks