//-1 if no option protected int RandomDirToLocked(MazeCell c, bool isLocked = true) { (int[] d, int r) = c.GetLocked(isLocked); if (r == 0) { return(-1); } int k = Random.Range(0, r); return(d[k]); }