public void AddChild(TreeNode child) { this.children.Add(child); }
public Tree(TreeNode root) { this.root = root; }
public TreeNode(int value, int row, int col) { this.Col = col; this.Row = row; this.Value = value; this.parent = null; this.children = new List<TreeNode>(); }
public Tree TraverseTree(Tree tree, TreeNode startCell, string[,] matrix) { foreach (TreeNode child in startCell.GetChildren()) { Cell currentCell = new Cell(child.Value.ToString(), child.Row, child.Col); IEnumerable<Cell> cellsInRange = GetCellsInRange(currentCell, matrix); foreach (Cell cell in cellsInRange) { } } return tree; }