static void Main(string[] args) { GetDictionary(out Dictionary dictionary); DictionaryScanner.AddDictionary(dictionary); Console.Write("\nPodaj słowa - jedno po drugim każde oddzielaj enterem:\n\n"); do { string word = Console.ReadLine(); StartAsync(word, 50, 3); } while (true); }
private static void Start(string word, int count, int distance) { var result = new List <string>(); Boolean isGood = false; string copy = word; if (!DictionaryScanner.IsLowerWordInDictionary(ref word) && word.Length > 1) { result = DictionaryScanner.FindSimilarWords(word, count); } else { if (copy != word) { result.Add(word); } else { isGood = true; } } if (isGood) { Console.WriteLine("- good"); } else { Console.Write("-false\nPODPOWIEDZI:\n"); foreach (var item in result) { Console.WriteLine(item); } Console.Write("\n"); } }