Giter VIP home page Giter VIP logo

node_bulls-and-cows's Introduction

The "Bulls & Cows" game

Read the guideline before start

Implement Bulls and cows game so the user can run and play it using command line.

  • the program randomly generates a number of 4 different digits
  • and asks a player to guess
  • the player enters a number of 4 different digits
  • the program check the entered number (if it has exactly 4 different digits)
  • then computer compares a try with the generated number and shows a result of 'bulls' and 'cows'
  • bull - guessed digit is on its place (index)
  • cow - guessed digit exists in the number but the place (index) is wrong
  • the game ends when the numbers is found
  • write a solution using separate modules for generating a number, calculating bulls and cows, validate user input, input/output operations (corresponding files are already created)
  • use npm run test command to test your modules
  • use npm run play to run the game

Example

Computer makes 1234, user prints 1345. The result is one bull (guessed digit 1 is on it's place) and 2 cows (digits 3 and 4 are present but on wrong places).

node_bulls-and-cows's People

Contributors

artemtopolskyi avatar mgrinko avatar sergii-nosachenko avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.