private bool IsValidNextPoint(PointInMatrix point) { if (point.Row >= 0 && point.Col >= 0 && point.Row < this.labyrinth.GetLength(0) && point.Col < this.labyrinth.GetLength(1)) { if (this.labyrinth[point.Row, point.Col] == "0") { return true; } } return false; }
void SetupPoint(int i, int j, PointInMatrix point) { point.i = i; point.j = j; point.point = points[i][j]; }