## Number Bulls & Cows

**Players: **Two

Players take turns in trying to guess each other's number.

### Description

One player, the Chooser, thinks of a four-digit number and the other player, the Guesser, tries to guess it.

At each turn the Guesser tries a four digit number, and the Chooser says how close it is to the answer by giving:

- The number of Bulls - digits correct in the right position.
- The number of Cows - digits correct but in the wrong position.

The Guesser tries to guess the answer in the fewest number of turns.

If either number has repeated digits the rule is that each digit can only count towards the score once, and Bulls are counted before Cows.

#### Example

For example, if the Chooser has thought of the number 2745 the replies for some guesses are as follows:

- Guess: 1389 - Reply: 0 Bulls, 0 Cows.
- Guess: 1234 - Reply: 0 Bulls, 2 Cows.
- Guess: 1759 - Reply: 1 Bull, 1 Cow.
- Guess: 1785 - Reply: 2 Bulls, 0 Cows.
- Guess: 2745 - Reply: 4 Bulls!