void PrintNode(AttemptsTreeNode node, String cText) { foreach (AttemptsTreeNode temp in node.NextLevel) { Console.WriteLine(node.GetVal(cText)); if (temp.NextLevel.Count != 0) { PrintNode(temp, cText); } } }
bool ContainsCommonStuff(AttemptsTreeNode node, String originalText) { foreach (String c in commonDigraphs) { if (node.GetVal(originalText).Contains(c)) { return(true); } } foreach (String c in commonWords) { if (node.GetVal(originalText).Contains(c)) { return(true); } } return(false); }
void CountCommon(AttemptsTreeNode node, String originalText) { foreach (String c in commonDigraphs) { if (node.GetVal(originalText).Contains(c)) { node.NumCommon++; } } foreach (String c in commonWords) { if (node.GetVal(originalText).Contains(c)) { node.NumCommon++; } } foreach (AttemptsTreeNode next in node.NextLevel) { CountCommon(next, originalText); } }