// ============================================================================ // File: questionGame.cpp // Author: Jay Oblay (Frenchman extraordinaire) // Last Modified: Fall 2020 // Description: // This is a text based game where // The player first thinks of an animal. // The computer then asks a set of yes or no questions to // discover what the animal is. // // If the computer guesses the correct animal all is good. // If not the computer asks the user what animal he/she was thinking of // and a yes or no question to determine the difference between // what the computer guessed and what the animal actually was. // These extra/new animals and related questions and answers // are stored in 2 support text files. // See also the template file // // This serves an an illustrative (and fun) example of how to // use the binary tree data structure. // It also shows how to input and output to a file. // // Tasks: Find the TODOs, clean up this code // // Is this really using a tree class? (it only declares the node type...) // Could this code be restructured to use a tree class? // // TODO: // This program stores out "new" questions and answers and animals // to two text files // Can you find a way to read them back in the next time the program is // run? --- warning the current way things are output might not be // good enough to work, do you need two files? or can it be done with // just one? // // TODO: clean up the comments, add comments where needed // // ============================================================================