Ejemplo n.º 1
0
 public ArrayPath(int m, int n, int maxValue, int sumGoal)
 {
     this.numberArray    = RandomFunc.GenerateRandomArray(m, n, maxValue);
     this.arrayRows      = m;
     this.arrayCols      = n;
     this.sumGoal        = sumGoal;
     this.indexPath      = new List <IndexPair>();
     this.pathCollection = new List <string>();
 }
Ejemplo n.º 2
0
 public void SetStart(int x = -1, int y = -1)
 {
     if (x == -1)
     {
         this.startX = RandomFunc.GetRandomInt(this.arrayRows, (int value) => { return(value >= 1 && value <= this.arrayRows); });
     }
     else
     {
         this.startX = x;
     }
     if (y == -1)
     {
         this.startY = RandomFunc.GetRandomInt(this.arrayCols, (int value) => { return(value >= 1 && value <= this.arrayCols); });
     }
     else
     {
         this.startY = y;
     }
 }