One of the simplest mechanisms for tackling decision-making problems is decision trees, because they are fast and easy to grasp and implement. As a consequence, it's one of the most widely-used techniques today; it is extensively used in other character-controlled scopes such as animations.
Choosing through a decision tree
Getting ready
This recipe requires a good understanding of recursion and inheritance, as we will constantly be implementing and calling virtual functions throughout the sections.
How to do it...
This recipe requires a lot of attention due to the...