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>(); }
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; } }