public void TrieSolver() { var solver = new TrieSolver { RootTrie = LetterTrieList[DictionarySize] }; Array.ForEach(Boggles, boggle => solver.Run(boggle)); }
public void Test_TrieSolver() { var solver = new TrieSolver { RootTrie = WordBook.Maxi.GetLetterTrie() }; var timer = Stopwatch.StartNew(); Array.ForEach(_testData.Boggles, boggle => solver.Run(boggle)); timer.Stop(); _testOutput.WriteLine($"Duration = {timer.ElapsedTicks}"); }
public void Check_TrieSolver() { var solver = new TrieSolver { RootTrie = WordBook.Test.GetLetterTrie() }; Array.ForEach(_testData.Boggles, boggle => { var result = solver.Run(boggle); _testOutput.WriteLine($"{solver.ChainCounter} chains"); result.Words.Count.Should().Be(boggle.Count); result.Score.Should().Be(boggle.Score); }); }