public void Produce()
 {
     if (style == RandomMapStyle.RandomMaze)
     {
         map = RandomMaze.generateMaze(width, height, branch_max);
     }
     else
     {
         map3D = RandomMaze.generateMaze3D(width, height, depth, branch_max);
     }
 }
Ejemplo n.º 2
0
        public IPosition_ConnectedSet Produce()
        {
            IPosition_ConnectedSet set = null;

            switch (style)
            {
            case RandomMapStyle.RandomMaze:
                int[,] map = RandomMaze.generateMaze(width, height, branch_max);
                set        = RandomMaze_IPosition_Connected.GenerateMap_from_Array(map, width, height);
                break;

            case RandomMapStyle.RandomMaze3D:
                int[, ,] map3d = RandomMaze.generateMaze3D(width, height, depth, branch_max);
                set            = RandomMaze_IPosition_Connected.GenerateMap3D_from_Array(map3d, width, height, depth);
                break;
            }
            return(set);
        }