Guess the 4-digit Number

Guess the 4-digit number is a simple game where the player has to guess a secret 4-digit number with unique digits from 1 to 9. The player has 10 attempts to guess the correct number.

Screenshot

How to Play

  1. Enter a 4-digit number with unique digits from 1 to 9.
  2. Press “Enter” or click the “Send” button to make a guess.
  3. The game will show the number of “Goods” and “Corrects” for each guess.
    • “Goods” are the number of digits in the guess that are in the secret number but in a different position.
    • “Corrects” are the number of digits in the guess that are in the correct position.
  4. Keep making guesses until you find the secret number or run out of attempts.

Demo

You can play the game here.

Features

  • 4-digit secret number with unique digits
  • 10 attempts to guess the secret number
  • Hints in the form of “Goods” and “Corrects”
  • Responsive design for mobile and desktop

License

This project is open-source and available under the MIT License.

GitHub

View Github