The other person has a limited number of chances to guess what the code is.
Every move consists of submitting a guess, and the first player replying with a score.
Each scoring reveals a little more information about the code. A guess is scored by giving a certain number of cows and a certain number of bulls. This game is perfect for a computer because the person who makes the code has nothing to do but score the other player's guesses - a mechanical task. Here's how the scoring works. For every number in the code that is matched by the same number in the same position in the guess, a splat is scored.