Assets.Core.Scripts.TreeGeneration.MapGenerator.SmoothClusters C# (CSharp) Метод

SmoothClusters() приватный Метод

private SmoothClusters ( ) : void
Результат void
        private void SmoothClusters()
        {
            for (int x = 0; x < Width; x++)
            {
                for (int y = 0; y < Height; y++)
                {
                    int neighbourWallTiles = GetSurroundingWallCount(x, y);

                    if (_map[x, y] == 1)
                        continue;
                    if (neighbourWallTiles > 0 && Random.Range(0,100) < 15)
                        _map[x, y] = 1;
                    else
                        _map[x, y] = 0;
                }
            }
        }