public virtual void SortWords(WordSorter wordSorter) { if (wordSorter != null) { wordSorter.Sort(_words); } }
public Solution(Board board, WordSorter wordSorter = null) { if (Dictionary == null) { SetDictionary(); } _board = board; foreach (Tile tile in _board.Tiles) { SearchUsing(tile, new List <Tile>(), string.Empty, new TrieSearchResult()); } _words = _stringWordMap.Values.ToArray(); TotalPoints = _words.Sum(w => w.BestPathPoints); SortWords(wordSorter); }