Bulls and Cows: Guess secret text with clues

By K. Ramanraj

Guess the 4 character secret text:



Time:  
Score Board:

Rules and Hints:

The aim of the game is to guess the 4 character secret text randomly generated, with clues given as a response to your guess. Every straight match adds up as bulls and any other match adds up as cows. For example if the secret text was "LUCK" the attempts to guess are evaluated as follows:
LUCKThe word to be guessed.
First tryABCDThe third letter C is a straight match. No other matches found. hence "1 Bull 0 Cows"
2nd tryEFGHNo matches. Response is "0 Bulls 0 Cows". You can omit all the four characters from further guesses.
3rd tryIJKLK and L match as Cows. Hence "0 Bulls 2 Cows"; You have to eliminate two characters. I would try EFIJ because, EF are definitely absent and I can test IJ alone.
4th tryEFIJNo matches. Hence "0 Bulls 0 Cows". Now I can rule out I and J also. That gives me a sold clue that KL are included in the secret. I would thus reason out with more tries.
Finally,LUCKBull's Eye!
You are allowed only 20 tries per game after which the secret text is revealed and a new game starts. Have fun with Bulls and Cows!

To try playing a game with the secret word set to "LUCK" and since this is only a trial game, its outcome is not added to the score.

Thanks:

I would like to thank Mr. K. Vaitheeswaran for having introduced me to this game. It can also be played with a friend on odd ends of paper when too bored with Tic-Tac-Toe.

Copyright (C) 2001 K. Ramanraj

Please send your comments on the content of these web pages to ramanraj@vsnl.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 1