Solved

Guessing Game

Posted on 2004-10-11
3
644 Views
Last Modified: 2012-05-05
I need to write a simple game that guesses an animal accoring to users input. It uses a "binary" tree (left, right, parent pointers) to build up a database. Program should be implemented using structs (not classes). Starts with a question"Does it have 4 legs" if Yes program guesses "Dog" if No "Bird", than prompts for another input. Im late on assignment, so I need help please!!!
0
Comment
Question by:Lana_K
3 Comments
 
LVL 12

Expert Comment

by:stefan73
ID: 12284585
Hi Lana_K,
We don't do your homework for you. Start coding, and if you have specific questions, come back.

Cheers!

Stefan
0
 

Author Comment

by:Lana_K
ID: 12291376
I don't need a code for the whole program I need ideas to make it stand out ! Suggestions on better implementations, any ideas to how to make the console more interesting. I already tried to make test red, but so far cant figure out how to make it work. I need a creative approach to an ordinary problem, NOT to do my homework.
0
 
LVL 11

Accepted Solution

by:
bcladd earned 500 total points
ID: 12297865
Console text color code: http://www.codeguru.com/Cpp/W-D/console/article.php/c3959/ (see http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_21136494.html for more comments on that).

Other interesting idea: Be able to give all the facts you have on the animal. I am assuming that your program learns? That is if you guess dog and I say NO you ask for the animal and a yes/no question that can tell a "cat" from a "dog" and then your question tree grows. Take a look at http://www.guessmaster.com/animal.asp for some of the possiblities.

If you have code questions, feel free to share your code and we would be happy to comment.

-bcl

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now