private static List <IPathNode> RegularSearch(ConcreteMap concreteMap, Position startPosition, Position endPosition)
{
var tilingGraph = concreteMap.Graph;
Func <int, int, ConcreteNode> getNode =
(top, left) => tilingGraph.GetNode(concreteMap.GetNodeIdFromPos(top, left));
// Regular pathfinding
var searcher = new AStar <ConcreteNode>(concreteMap, getNode(startPosition.X, startPosition.Y).NodeId, getNode(endPosition.X, endPosition.Y).NodeId);
var path = searcher.FindPath();
var path2 = path.PathNodes;
return(new List <IPathNode>(path2.Select(p => (IPathNode) new ConcretePathNode(p))));
}