public WordSearchState( string currentString, IPrefixTreeNode dictionaryNode) { Validate.IsNotNullOrEmpty(currentString); Validate.IsNotNull(dictionaryNode, "dictionaryNode"); CurrentString = currentString; DictionaryNode = dictionaryNode; }
private WordSearchState( string prefix, Tile nextTile, IPrefixTreeNode nextNode, bool useAlternate = false) { string nextLetters = useAlternate ? nextTile.AlternateLetters : nextTile.Letters; CurrentString = prefix + nextLetters; LastTileAdded = nextTile; DictionaryNode = nextNode; }
public WordSearchState( Tile startingTile, PrefixTreeDictionary dictionary, bool useAlternate = false) { Validate.IsNotNull(startingTile, "startingTile"); Validate.IsNotNull(dictionary, "dictionary"); CurrentString = useAlternate ? startingTile.AlternateLetters : startingTile.Letters; LastTileAdded = startingTile; DictionaryNode = dictionary.FindNode(CurrentString); }