The game is about to guess the random 4digit number generated by the pc.

The user input is checked, it has to be:

  • 4 unique digit long
  • with no 0 at the first digit
  • contains only digits

The user input is compared with the pc generated number. Digit by digit the following is calculated:

  • the number of "bulls", which are digits in the guess that are in the correct position.
  • the number of "cows", which are digits in the guess that are in your secret number but are located in the wrong position.
  • every attempt of guess, the final number is presented to the user