static void Main(string[] args) { PuzzleFileParser solver = new PuzzleFileParser(); WordSearchPuzzle puzzle = solver.ParseFileToWordSearchPuzzle(args[0]); WordsLocationFinder wordsFinder = new WordsLocationFinder(puzzle); WordsMapDecorator wordsMap = wordsFinder.GetWordsMap(); Console.WriteLine(wordsMap.ToString()); }
public WordsMapDecorator GetWordsMap() { Dictionary <String, List <Vector2> > wordsLocation = FindAllWordLocations(wsPuzzle); WordsMapDecorator wordsMap = new WordsMapDecorator(wordsLocation); if (!wordsMap.IsValid()) { throw new InvalidDataException(); } return(new WordsMapDecorator(wordsLocation)); }