Text based word game Cows and Bulls written in Python
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
cab.py
words_4.txt
words_4_uniq.txt

README.md

Installation:

There is no installation, you just need python interpreter to run the program.

python cab.py

What is Cows and Bulls Game?

'Cows and Bulls' is a text based word game. Your goal is to guess the 4 letter word. You have eight attempts to guess.

For each guess the computer will say how close your guess is to the answer.

Bull - Number of characters in your guess that exist in the answer and match the location.

Cow - Number of characters that exist in the answer but don't match the exact spot.

eg:

AnswerGuessCowsBulls
saltcard01
saltmats21
saltmalt03
saltsalt04

Game Output:

$ ./cab.py
1 Input a Word: card
cow,bull 0 1
2 Input a Word: mats
cow,bull 2 1
3 Input a Word: malt
cow,bull 0 3
4 Input a Word: salt
cow,bull 0 4
Victory!!
Wow! that only took like 4 attempts.