b9-code / Bulls-Cows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bulls-Cows

This is the ASCII version of the game of Bulls and Cows.
Language : C

#The rules of the game

The user initially enters the given word, then after which, the player has to guess the word , with the help of the clues given.
The clues are given in the form of the number of Bulls and Cows.

If the position of the letter of the given word ( the word that the user enters) and the guess word (the word that the player enters) coincide, then it is called a 'Bull'. Else it is called a 'Cow'.

let me say , The given word is "foul"

CASE 1: my guess word is "foal"
here , I have 3 Bulls and 0 Cows , as f,o,l coincide as to the exact positions of the given word.

CASE 2: my guess word is "olaf"
here, I have 3 Cows and 0 Bulls, as f,o,l are in the word but in different positions.

CASE 3: my guess word is "abcd"
We have 0 Cows and 0 Bulls.

I have put an easy level for this game, which is only 3 letters , Where you get to know the positions of the cows and the bulls also, so that it helps in the better understanding of the game.

The intermediate, hard and the expert levels have 4,5,6 letters respectively and these will give the number of bulls and cows only, but not the positions.

About


Languages

Language:C 100.0%