I’m taking an intro Game Development course online (it’s well known that I hate online courses in general) and here I am on what amounts to day three and I’m struggling.
Instructor:”So, you just need to make up this data tree thing with nodes and identifiers and stuff… look, just do it and get back to me. Here’s an outline:
- Each node has an ID property which is unique number identifying the node
- Each node as a Report() method that will print to the console it’s ID and if its a leaf or not
- When created, the tree has a single node, the root
- The tree has a SplitLeafs() method which will cause all leafs to create two children
- The tree has a VisitAll() method which will visit every node and call the node’s Report() method
- The tree has a LeafReport() method which call Report() on just the leaf nodes
- In your main() method in Program.cs/Main.cs, you have the following:
- Create a tree
- Call VisitAll() on the tree
- Call SplitLeafs() on the tree
- Call LeafReport() on the tree
- Call SplitLeafs() on the tree
- Call VisitAll() on the tree”
Me: “Um, OK. I don’t really know what this is, but if you say it’s easy, I’m sure that I can figure it out.”
Instructor:”Got it yet?”
Me: “Arghh… Let’s see: Tree class and Node class… How do I instantiate these things?
The root has no parent, but has children…”
Instructor:”Yeah. You totally have it. Let’s talk about the completed project tomorrow.”
Me:”Oh crap. So, the tree just gets made once, but then it makes the nodes…? Each node will hold some data: let’s keep that simple. Make it an integer.
Ughh. Simple isn’t simple enough.”
Instructor:” A leaf if just a node. It has a parent, but no children.”
Me: “And, how to we do this splitLeaf thing?”
Instructor:” Look, it’s just a couple methods within the class. write up a couple setters and a couple getters and then one or two other methods to do the work.”

Look, I don’t mean to tighten the screws or anything, but this needs to be done and uploaded onto the Google+ document space…
I’m not kidding. I went from dominating my into C++ class to being a joke in this next class. I’ll try to deconstruct the problem and post a walkthrough of the general idea if anyone’s interested.