I don't understand bull cow game

I thought bull cow game is :
when the letter exist and match the same place then
Bull = 1 .Cow = 0

and if the letter exist but not in the same place then
Bull = 0 .Cow = 1

in the end of the lecture Mr.Ben had :
Bull = 3 .Cow = 6

How is that ?!!!

this is my code :

int32 HiddenWordLength = MyHiddenWord.length();
for (int32 i = 0; i < HiddenWordLength; i++) {
	//compare letters against the hidden word
	for (int32 j = 0; j < HiddenWordLength;j++) {
		//if thay match then
		if (Guess[i] == MyHiddenWord[j]) {
			//if they're in the same place
			if (i == j) {
				// increment Bulls 
				BullCowCount.Bulls++;
			}
			//if not (else)
			else {
				// increment Cows
				BullCowCount.Cows++;
			}
		}
	}
}

Privacy & Terms