The classic game where you must determine the four digit secret code, similar to the popular game Mastermind.
Bull and cows is a traditional code breaker game, similar to the popular game Mastermind.
The object is to guess the four digit secret code. The secret code has the following properties:
1. The code contains only the digits 0 through 9.
2. All digits in the code are different (no two digits appear twice).
3. The code does not start with a 0.
To help you break the code, for each guess you will be told how many bulls and cows are present:
For example, if the code is 1570, and you guess 1098, you get 1 bull (for the digit 1, which is in the correct place), and 1 cow (for the digit 0, which is in the code, but in the wrong place).
When you have 4 bulls, you win the game.