static void Main(string[] args) { Point start = new Point(0, 0); Point end = new Point(5, 5); Direction[,] inputlabyrinth = new ToCommonFormatConverter().Convert(rawlabyrinth); IEnumerable <Direction> way = PathIterator.GetWay(inputlabyrinth, start, end); foreach (var step in way) { Console.WriteLine(step); } Console.ReadKey(); }