public void CellSolver() { var solver = new CellSolver { RootTrie = LetterTrieList[DictionarySize] }; Array.ForEach(Boggles, boggle => solver.Run(boggle)); }
public void Test_CellSolver() { var solver = new CellSolver { 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_CellSolver() { var solver = new CellSolver { 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); }); }