protected AStar(VG.Map.Tissue tissue, bool expl, Point start, int width) { this.tissue = tissue; X = tissue.Width; Y = tissue.Height; exArray = new int[X + 1, Y + 1]; openList = new int[X * Y + 2]; openX = new int[X * Y + 2]; openY = new int[X * Y + 2]; parentX = new int[X + 1, Y + 1]; parentY = new int[X + 1, Y + 1]; Fcost = new int[X * Y + 2]; Gcost = new int[X + 1, Y + 1]; Hcost = new int[X * Y + 2]; history = new List<FPath>(); map = new int[X, Y]; for (int i = 0; i < X; i++) { for (int j = 0; j < Y; j++) map[i, j] = (int)tissue[i, j].AreaType; } this.bogStartX = start.X; this.bogStartY = start.Y; this.bogWidth = width; this.explorer = expl; }
protected AStar(VG.Map.Tissue tissue, bool expl, Point start, int width) { this.tissue = tissue; X = tissue.Width; Y = tissue.Height; exArray = new int[X + 1, Y + 1]; openList = new int[X * Y + 2]; openX = new int[X * Y + 2]; openY = new int[X * Y + 2]; parentX = new int[X + 1, Y + 1]; parentY = new int[X + 1, Y + 1]; Fcost = new int[X * Y + 2]; Gcost = new int[X + 1, Y + 1]; Hcost = new int[X * Y + 2]; history = new List <FPath>(); eHistory = new List <FPath>(); map = new int[X, Y]; for (int i = 0; i < X; i++) { for (int j = 0; j < Y; j++) { map[i, j] = (int)tissue[i, j].AreaType; } } this.bogStartX = start.X; this.bogStartY = start.Y; this.bogWidth = width; this.explorer = expl; }
public AStar(VG.Map.Tissue tissue) { openList = new List<Node>(); closeList = new List<Node>(); this.tissue = tissue; this.x = tissue.Width; this.y = tissue.Width; this.existsArray = new int[this.x, this.y]; }
int[,] existsArray; /*массив для определения в каком списке лежит point * 0 - точка ни в одном списке * 1 - точка в открытом списке * 2 - точка в закрытом списке * =)) * */ public AStar(VG.Map.Tissue tissue) { openList = new List <Node>(); closeList = new List <Node>(); this.tissue = tissue; this.x = tissue.Width; this.y = tissue.Width; this.existsArray = new int[this.x, this.y]; }
public AStar(VG.Map.Tissue tissue, Point start, int width) : this(tissue, false, start, width) { }
public AStar(VG.Map.Tissue tissue) : this(tissue, new Point(0, 0), 0) { }
public eAStar(VG.Map.Tissue tissue, Point start, int width) : base(tissue, true, start, width) { }