Пример #1
0
        public void CellSolver()
        {
            var solver = new CellSolver
            {
                RootTrie = LetterTrieList[DictionarySize]
            };

            Array.ForEach(Boggles, boggle => solver.Run(boggle));
        }
Пример #2
0
        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}");
        }
Пример #3
0
        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);
            });
        }