Exemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 public Pathfinder()
 {
     random = new Random();
     start = new Position();
     target = new Position();
     check = new Position();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="x">horizontal coordinate</param>
 /// <param name="y">vertical coordinate</param>
 /// <param name="g">number of steps from the starting point</param>
 /// <param name="parent">position leading to this position (default = null)</param>
 public Position(int x, int y, Position parent)
 {
     location = new int[] { x, y };
     this.parent = parent;
     g = parent.g + 1;
 }