///<summary>Creates a rectangular node map with all nodes vistable and movement cost of 1</summary> ///<param name="xNodes">Number of nodes in the x direction of the map</param> ///<param name="yNodes">Number of nodes in the y direction of the map</param> ///<param name="nodeMapGenerator">A custom node map generator</param> public Map(int xNodes, int yNodes, INodeMapGenerator nodeMapGenerator) { _xNodes = xNodes; _yNodes = yNodes; _nodeMapGenerator = nodeMapGenerator; _nodeMap = _nodeMapGenerator.GenerateNodeMap(_xNodes, _yNodes); }
///<summary>Intiates the map with the default blank map</summary> ///<param name="xNodes">Number of nodes in the x direction of the map</param> ///<param name="yNodes">Number of nodes in the y direction of the map</param> public Map(int xNodes, int yNodes) { _xNodes = xNodes; _yNodes = yNodes; _nodeMapGenerator = new BlankNodeMap(); _nodeMap = _nodeMapGenerator.GenerateNodeMap(_xNodes, _yNodes); }
/// <summary> /// Create a new flatten processor instance. /// </summary> /// <param name="nodeMapGenerator">The node map generator to use for the initial node mapping step of the algorithm. Defaults to a new instance of <see cref="NodeMapGenerator"/>.</param> public FlattenProcessor(INodeMapGenerator nodeMapGenerator = null) { _nodeMapGenerator = nodeMapGenerator ?? new NodeMapGenerator(); }