static void Main(string[] args) { var tiles = new TilesInWrongPlace(new BoardEqualityComparer()); var manhattan = new ManhattanDistance(new BoardEqualityComparer()); var manhattanSquare = new SquareOfManhattanDistance(new BoardEqualityComparer()); var start = new SearchNode() { Status = new int[9] { 0, 1, 3, 4, 2, 5, 7, 8, 6 }, Steps = 0 }; var goal = new SearchNode() { Status = new int[9] { 1, 2, 3, 4, 5, 6, 7, 8, 0 }, Steps = 0 }; Console.WriteLine("Missing Tiles"); var path = tiles.GetPath(start, goal); foreach (var s in path) { PrintMatrix(s.Status); } Console.WriteLine("Manhattan"); path = manhattan.GetPath(start, goal); foreach (var s in path) { PrintMatrix(s.Status); } Console.WriteLine("Square Manhattan"); path = manhattanSquare.GetPath(start, goal); foreach (var s in path) { PrintMatrix(s.Status); } }