Пример #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            Addition  addition    = new Addition();
            AlgRandom algGenerate = new AlgRandom();

            switch (algIndex)
            {
            case 0:
                map = addition.Add(map, algGenerate.Generate(Int32.Parse(textBox1.Text)));
                DisplacementMap.Image = map;
                break;

            case 1:
                AlgPerlin perlin = new AlgPerlin();
                map = addition.AddPerlin(map, perlin.Generate(Int32.Parse(textBox1.Text), Int32.Parse(textBox1.Text)));
                DisplacementMap.Image = map;
                break;
            }

            listBox1.Items.Add($"X = {Int32.Parse(textBox1.Text)}; Y = {Int32.Parse(textBox1.Text)}");
            listBox1.Items.Add("");


            DisplacementMap.Image = map;
        }