Open TheCorio opened 7 years ago
public class Goal
{
public uint Index { get; set; }
public string Content { get; set; }
public string ProvidesFor { get; set; } // TODO edit get() to return int[]
}
It really doesn't look like OOP style. We better delete property "Index" and do it more like a LinkedList implementation.
public class Goal
{
private List<Goal> _descendants = new List<Goal>();
public string Content { get; set; }
public List<Goal> Descendants => _descendants;
}
And then we'll have class GoalTree
public class GoalTree
{
public Goal Heap {get; }
}
Or to be more OOP & generics men
public class Goal { string Content {get; set;} ... }
public class GoalTree : Tree<Goal> {...}
public class TreeNode<T> {...}
public class Tree<T> {...}
btw, I already have my own realization of two last classes.
And for what reason we need GoalTree, GoalHierarchy and GoalGraph classes? From my point of view, they are redundant.
So, I propose my candidature for implementation of this part.
Of course you can implement this part. Be my guest!
Here some notes, that might help you:
Needed to be designed: