Skip to content
A number guessing game (the original name is Bulls and Cows but I like violence so lol)
HTML JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A number guessing game.

The purpose of the game is to guess the random number generated by the computer.

If your guess has the right number in the right position, it registers as +1Dead.

If it has the right number but in the wrong position, it registers as +1Wounded

Example: Computer generates a random number 4123 and you guess 2167 so it returns 1 dead, 1 wounded.

How To Play

  1. Choose a difficulty level (Easy - 4 numbers, Medium - 5 numbers, Hard - 6 numbers).
  2. Start guessing.
  3. Use the responses to figure out the computer's number.


  • The length of the number must correspond to the level chosen i.e. 1234 for Easy, 12345 for Medium, 123456 for Hard
  • The input must consist only of numbers (no letters or special characters)
  • The number should not have duplicate characters (no repeated numbers e.g. 0012, 1656 etc)

Open Source

This project is open to contributions from the public. Basically, if you're a beginner, think of it as your introduction to open source. And if you've been open sourcing for a while, here's another contribution to add to your belt.


Checkout for details on creating pull requests and solving issues and all that jazz.


This project is licensed under the MIT License - see the LICENSE file for details.

You can’t perform that action at this time.