internal void SolveSetUnity1() { var random = new Random(); int width = random.Next(150, 300); int height = random.Next(150, 300); var path = "Assets/Dictionaries/Dictionary_Big2.txt"; var board = BoardUtility.GenerateRandomBoard(width, height); Solve(String.Format("Big random board ({0}x{1})", width, height), path, board, false); }
internal void Solve(string setName, string path, char[,] board, bool printWords = true) { ISolver solver = MyBoggleSolution.CreateSolver(path); var result = solver.FindWords(board); Console.WriteLine(String.Format("=== {0} ===\nScore: {1}", setName, result.Score)); if (result.Score == 0) { BoardUtility.PrintBoard(board); } if (printWords) { foreach (var word in result.Words.ToArray().OrderBy(x => x)) { Console.WriteLine(word); } Console.WriteLine(String.Format("=== {0} ===\nScore: {1}", setName, result.Score)); } Console.WriteLine(); }