public IGameObject Generate()
        {
            if (Parameters.ContainsKey("MapSize"))
            {
                MapSize = (int)Parameters["MapSize"];
            }
            var arr = GenerateVertices(MapSize);

            arr = Utils.ShiftTerrain(arr);
            HeightMapGenerator.Generate(_graphicDevice, arr, "Random");
            return(new PrimitiveBase(_graphicDevice, _graphicDeviceManeger, arr, MapSize));
        }
        public IGameObject Generate()
        {
            var arr = Utils.GetEmptyArray(Size, Size, 0);

            for (int i = 0; i < Size; i++)
            {
                for (int j = 0; j < Size; j++)
                {
                    arr[i][j] = GetCellular(i, j);
                }
            }

            arr = PostModifications.Normalize(arr, Size, Height);
            HeightMapGenerator.Generate(_graphicDevice, arr, "Voronoi (" + noiseType.ToString() + ")");
            return(new PrimitiveBase(_graphicDevice, _graphicDeviceManeger, arr, Size));
        }
        public IGameObject Generate()
        {
            var arr = Utils.GetEmptyArray(2, 2, -1);

            for (var i = 0; i < arr.Length; i++)
            {
                for (var j = 0; j < arr.Length; j++)
                {
                    arr[i][j] = GetRandom();
                }
            }


            for (int i = 1; i < Iterations; i++)
            {
                var Divided = DivideToSquares(arr);

                var squaredArray = new List <float[][]>();
                for (int j = 0; j < Divided.Count; j++)
                {
                    var div = Square(Divided.ElementAt(j));
                    squaredArray.Add(div);
                }

                var middedArray = new List <float[][]>();
                for (int j = 0; j < squaredArray.Count; j++)
                {
                    var mid = Mid(squaredArray.ElementAt(j));
                    middedArray.Add(mid);
                }

                var diamondedArray = new List <float[][]>();
                for (int j = 0; j < middedArray.Count; j++)
                {
                    var diamond = Diamond(middedArray.ElementAt(j));
                    diamondedArray.Add(diamond);
                }
                arr           = ConnectArrays(diamondedArray);
                Displacement /= 2;
            }
            arr = PostModifications.Normalize(arr, arr.Length, Height);
            arr = Utils.ShiftTerrain(arr);
            HeightMapGenerator.Generate(_graphicDevice, arr, "Diamond Square");
            return(new PrimitiveBase(_graphicDevice, _graphicDeviceManeger, arr, arr.Length));
        }
        public IGameObject Generate()
        {
            var arr = Utils.GetEmptyArray(MapSize, MapSize, 10);

            for (int j = 0; j < Walkers; j++)
            {
                int PointX = rand.Next(0, MapSize);
                int PointY = rand.Next(0, MapSize);

                int Steps = rand.Next(MinSteps, MaxSteps);
                for (int i = 0; i < Steps; i++)
                {
                    Walk(arr, ref PointX, ref PointY);
                }
            }


            arr = PostModifications.Smooth(arr, 1);
            arr = Utils.ShiftTerrain(arr);
            HeightMapGenerator.Generate(_graphicDevice, arr, "Drunkard walk");
            return(new PrimitiveBase(_graphicDevice, _graphicDeviceManeger, arr, MapSize));
        }