Ejemplo n.º 1
0
        public static bool[][] RandomMatrix(this AbstractMazeGenerator amg, int width, int height)
        {
            bool[][] mat = new bool[height][];

            for (int i = 0; i < height; i++)
            {
                mat[i] = new bool[width];
                for (int j = 0; j < width; j++)
                {
                    mat[i][j] = Random.value > 0.5f;
                }
            }

            return(mat);
        }
Ejemplo n.º 2
0
 public static bool[][] ConstructMatrix(this AbstractMazeGenerator amg, int width, int height, bool initVal = false)
 {
     return(ConstructMatrix(width, height, initVal));
 }