Esempio n. 1
0
        // Generate and populate the forest
        public override void Generate(Chunk chunkToPopulate)
        {
            // Set the constants
            name = "chaparral";
            normalTemperature = 70;
            normalWindSpeed   = 25;
            associatedColor   = "$ga";
            // Create a new random generator
            Random random = new Random();

            // Generate the chunks properties
            chunkToPopulate.windSpeed   = (normalWindSpeed * (random.Next(2, 8) / 5));
            chunkToPopulate.temperature = (normalTemperature * (random.Next(2, 4) / 3));

            #region Add minerals
            // Decide whether to generate boulder
            if (random.Next(1, 3) == 1)
            {
                // the amont of boulder
                int amontOfBoulders = random.Next(1, 3);

                for (int i = 0; i < amontOfBoulders; i++)
                {
                    // Create a new piece of boulder
                    Minerals.MineralBasaltBoulder newBoulder = new Minerals.MineralBasaltBoulder();
                    chunkToPopulate.AddChild(newBoulder);
                }
            }
            #endregion

            #region Add plants
            // the amont of eucalyptus trees
            int amontOfEucalyptusTrees = random.Next(5, 20);

            for (int i = 0; i < amontOfEucalyptusTrees; i++)
            {
                // Create a new Eucalyptus Trees
                Plants.PlantEucalyptusTree newEucalyptusTree = new Plants.PlantEucalyptusTree();
                newEucalyptusTree.identifier.name = "tree";

                // Make it eather short or tall
                if (random.Next(0, 1) == 0)
                {
                    newEucalyptusTree.identifier.descriptiveAdjectives.Add("short");
                }
                else
                {
                    newEucalyptusTree.identifier.descriptiveAdjectives.Add("tall");
                }

                newEucalyptusTree.identifier.classifierAdjectives.Add("eucalyptus");
                chunkToPopulate.AddChild(newEucalyptusTree);
            }
            #endregion
        }
Esempio n. 2
0
        // Generate and populate the forest
        public override void Generate(Chunk chunkToPopulate)
        {
            // Set the constants
            name = "swamp";
            normalTemperature = 75;
            normalWindSpeed   = 10;
            associatedColor   = "$ga";
            // Create a new random generator
            Random random = new Random();

            // Generate the chunks properties
            chunkToPopulate.windSpeed   = (normalWindSpeed * (random.Next(2, 8) / 5));
            chunkToPopulate.temperature = (normalTemperature * (random.Next(2, 4) / 3));

            #region Add plants

            // Decide whether to generate cattails
            if (random.Next(1, 3) == 1)
            {
                // the amont of cattails
                int amontOfCattails = random.Next(15, 30);

                for (int i = 0; i < amontOfCattails; i++)
                {
                    // Create a new Cattail
                    Plants.PlantCattail newCattail = new Plants.PlantCattail();
                    newCattail.identifier.name = "cattail";
                    chunkToPopulate.AddChild(newCattail);
                }
            }

            // Decide whether to generate reeds
            if (random.Next(1, 3) == 1)
            {
                // the amont of reeds
                int amontOfReeds = random.Next(15, 30);

                for (int i = 0; i < amontOfReeds; i++)
                {
                    // Create a new reed
                    Plants.PlantReed newReed = new Plants.PlantReed();
                    newReed.identifier.name = "reed";
                    chunkToPopulate.AddChild(newReed);
                }
            }

            // Decide whether to generate lilys
            if (random.Next(1, 3) == 1)
            {
                // the amont of lilys
                int amontOfLilys = random.Next(3, 8);

                for (int i = 0; i < amontOfLilys; i++)
                {
                    // Create a new Lilys
                    Plants.PlantLily newLily = new Plants.PlantLily();
                    newLily.identifier.name = "lily";
                    chunkToPopulate.AddChild(newLily);
                }
            }
            #endregion

            #region Add minerals
            // the amont of Silt
            int amontOfSilt = random.Next(20, 50);

            for (int i = 0; i < amontOfSilt; i++)
            {
                // Create a new thing of silt
                Minerals.MineralSilt newSilt = new Minerals.MineralSilt();
                newSilt.identifier.name = "silt";
                chunkToPopulate.AddChild(newSilt);
            }

            // Decide whether to generate boulder
            if (random.Next(1, 5) == 1)
            {
                // the amont of boulder
                int amontOfBoulders = random.Next(1, 2);

                for (int i = 0; i < amontOfBoulders; i++)
                {
                    // Create a new boulder
                    Minerals.MineralBasaltBoulder newBoulder = new Minerals.MineralBasaltBoulder();
                    chunkToPopulate.AddChild(newBoulder);
                }
            }
            #endregion
        }
Esempio n. 3
0
        // Generate and populate the forest
        public override void Generate(Chunk chunkToPopulate)
        {
            // Set the constants
            name = "desert";
            normalTemperature = 110;
            normalWindSpeed   = 20;
            associatedColor   = "$oa";
            // Create a new random generator
            Random random = new Random();

            // Generate the chunks properties
            chunkToPopulate.windSpeed   = (normalWindSpeed * (random.Next(2, 8) / 5));
            chunkToPopulate.temperature = (normalTemperature * (random.Next(2, 4) / 3));

            #region Add plants
            // Decide whether to generate Saguaros
            if (random.Next(1, 3) == 1)
            {
                // the amont of Saguaros
                int amontOfSaguaro = random.Next(1, 4);

                for (int i = 0; i < amontOfSaguaro; i++)
                {
                    // Create a new Saguaro
                    Plants.PlantSaguaro newSaguaro = new Plants.PlantSaguaro();
                    newSaguaro.identifier.name = "saguaro";
                    chunkToPopulate.AddChild(newSaguaro);
                }
            }

            // Decide whether to generate yucca
            if (random.Next(1, 6) == 1)
            {
                // the amont of Saguaros
                int amontOfYucca = random.Next(1, 4);

                for (int i = 0; i < amontOfYucca; i++)
                {
                    // Create a new yucca
                    Plants.PlantYucca newYucca = new Plants.PlantYucca();
                    newYucca.identifier.name = "yucca";
                    chunkToPopulate.AddChild(newYucca);
                }
            }
            #endregion

            #region Add minerals
            // Decide whether to generate iron
            if (random.Next(1, 5) == 1)
            {
                // the amont of iron
                int amontOfIron = random.Next(1, 4);

                for (int i = 0; i < amontOfIron; i++)
                {
                    // Create a new piece of iron
                    Minerals.MineralIronOre newIronOre = new Minerals.MineralIronOre();
                    chunkToPopulate.AddChild(newIronOre);
                }
            }

            // Decide whether to generate boulder
            if (random.Next(1, 5) == 1)
            {
                // the amont of boulder
                int amontOfBoulders = random.Next(1, 2);

                for (int i = 0; i < amontOfBoulders; i++)
                {
                    // Create a new piece of boulder
                    Minerals.MineralBasaltBoulder newBoulder = new Minerals.MineralBasaltBoulder();
                    newBoulder.identifier.descriptiveAdjectives.Clear();
                    newBoulder.identifier.descriptiveAdjectives.Add("large");
                    chunkToPopulate.AddChild(newBoulder);
                }
            }

            // the amont of sand
            int amontOfSand = random.Next(100, 200);

            for (int i = 0; i < amontOfSand; i++)
            {
                // Create a new piece of sand
                Minerals.MineralSand newSand = new Minerals.MineralSand();
                chunkToPopulate.AddChild(newSand);
            }
            #endregion
        }
Esempio n. 4
0
        // Generate and populate the forest
        public override void Generate(Chunk chunkToPopulate)
        {
            // Set the constants
            name = "canyon";
            normalTemperature = 85;
            normalWindSpeed   = 20;
            associatedColor   = "$ea";
            // Create a new random generator
            Random random = new Random();

            // Generate the chunks properties
            chunkToPopulate.windSpeed   = (normalWindSpeed * (random.Next(2, 8) / 5));
            chunkToPopulate.temperature = (normalTemperature * (random.Next(2, 4) / 3));

            if (random.Next(0, 10) == 0)
            {
                Creatures.CreatureGoat newGoat = new Creatures.CreatureGoat(chunkToPopulate.attachedApplication);
                newGoat.identifier.descriptiveAdjectives.Add("wild");
                newGoat.identifier.classifierAdjectives.Add("bearded");
                chunkToPopulate.AddChild(newGoat);
            }

            #region Add minerals
            // Decide whether to generate boulder
            if (random.Next(1, 2) == 1)
            {
                // the amont of boulder
                int amontOfBoulders = random.Next(1, 5);

                for (int i = 0; i < amontOfBoulders; i++)
                {
                    // Create a new piece of boulder
                    Minerals.MineralBasaltBoulder newBoulder = new Minerals.MineralBasaltBoulder();
                    chunkToPopulate.AddChild(newBoulder);
                }
            }
            // Decide whether to generate copper
            if (random.Next(1, 3) == 1)
            {
                // the amont of copper
                int amontOfCopper = random.Next(3, 10);

                for (int i = 0; i < amontOfCopper; i++)
                {
                    // Create a new piece of copper
                    Minerals.MineralCopper newCopper = new Minerals.MineralCopper();
                    chunkToPopulate.AddChild(newCopper);
                }
            }
            // Decide whether to generate gold
            if (random.Next(1, 5) == 1)
            {
                // the amont of gold
                int amontOfGold = random.Next(2, 5);

                for (int i = 0; i < amontOfGold; i++)
                {
                    // Create a new piece of gold
                    Minerals.MineralGold newGold = new Minerals.MineralGold();
                    chunkToPopulate.AddChild(newGold);
                }
            }
            #endregion
        }
        // Generate and populate the forest
        public override void Generate(Chunk chunkToPopulate)
        {
            // Set the constants
            name = "mountain";
            normalTemperature = 25;
            normalWindSpeed   = 30;
            associatedColor   = "$pa";
            // Create a new random generator
            Random random = new Random();

            // Generate the chunks properties
            chunkToPopulate.windSpeed   = (normalWindSpeed * (random.Next(2, 8) / 5));
            chunkToPopulate.temperature = (normalTemperature * (random.Next(2, 4) / 3));

            #region Add minerals
            // the amont of gravel
            int amontOfGravel = random.Next(100, 200);

            for (int i = 0; i < amontOfGravel; i++)
            {
                // Create a new piece of sand
                Minerals.MineralGravel newGravel = new Minerals.MineralGravel();
                chunkToPopulate.AddChild(newGravel);
            }

            // Decide whether to generate boulder
            if (random.Next(1, 2) == 1)
            {
                // the amont of boulder
                int amontOfBoulders = random.Next(1, 5);

                for (int i = 0; i < amontOfBoulders; i++)
                {
                    // Create a new boulder
                    Minerals.MineralBasaltBoulder newBoulder = new Minerals.MineralBasaltBoulder();
                    chunkToPopulate.AddChild(newBoulder);
                }
            }

            // Decide whether to generate flint
            if (random.Next(1, 2) == 1)
            {
                // the amont of flint
                int amontOfFlint = random.Next(1, 5);

                for (int i = 0; i < amontOfFlint; i++)
                {
                    // Create a new piece of boulder
                    Minerals.MineralFlint newFlint = new Minerals.MineralFlint();
                    chunkToPopulate.AddChild(newFlint);
                }
            }

            // the amont of rocks
            int amontOfRocks = random.Next(1, 5);

            for (int i = 0; i < amontOfRocks; i++)
            {
                // Create a new piece of boulder
                Minerals.MineralBasaltRock newRock = new Minerals.MineralBasaltRock();
                chunkToPopulate.AddChild(newRock);
            }

            // Decide whether to generate Lead
            if (random.Next(1, 3) == 1)
            {
                // the amont of Lead
                int amontOfLead = random.Next(1, 4);

                for (int i = 0; i < amontOfLead; i++)
                {
                    // Create a new piece of Lead
                    Minerals.MineralLead newLead = new Minerals.MineralLead();
                    chunkToPopulate.AddChild(newLead);
                }
            }
            // the amont of copper
            int amontOfCopper = random.Next(0, 5);

            for (int i = 0; i < amontOfCopper; i++)
            {
                // Create a new piece of copper
                Minerals.MineralCopper newCopper = new Minerals.MineralCopper();
                chunkToPopulate.AddChild(newCopper);
            }

            // Decide whether to generate a shell
            if (random.Next(1, 10) == 1)
            {
                // Create a new shell
                Minerals.MineralCalicoScallopShell newScallopShell = new Minerals.MineralCalicoScallopShell();
                chunkToPopulate.AddChild(newScallopShell);
            }
            #endregion
        }
Esempio n. 6
0
        // Generate and populate the forest
        public override void Generate(Chunk chunkToPopulate)
        {
            // Set the constants
            name = "forest";
            normalTemperature = 50;
            normalWindSpeed   = 12;
            associatedColor   = "$ca";
            // Create a new random generator
            Random random = new Random();

            // Generate the chunks properties
            chunkToPopulate.windSpeed   = (normalWindSpeed * (random.Next(2, 8) / 5));
            chunkToPopulate.temperature = (normalTemperature * (random.Next(2, 4) / 3));

            if (random.Next(0, 10) == 0)
            {
                Creatures.CreatureBoar newBoar = new Creatures.CreatureBoar(chunkToPopulate.attachedApplication);
                newBoar.identifier.descriptiveAdjectives.Add("giant");
                newBoar.identifier.descriptiveAdjectives.Add("menacing");
                chunkToPopulate.AddChild(newBoar);
            }
            #region Add minerals
            // The amount of earth
            int amontOfEarth = random.Next(100, 200);

            for (int i = 0; i < amontOfEarth; i++)
            {
                // Create a new piece of Earth
                Minerals.MineralEarth newEarth = new Minerals.MineralEarth();
                chunkToPopulate.AddChild(newEarth);
            }

            // Decide whether to generate boulder
            if (random.Next(1, 3) == 1)
            {
                // the amont of boulder
                int amontOfBoulders = random.Next(1, 2);

                for (int i = 0; i < amontOfBoulders; i++)
                {
                    // Create a new piece of boulder
                    Minerals.MineralBasaltBoulder newBoulder = new Minerals.MineralBasaltBoulder();
                    chunkToPopulate.AddChild(newBoulder);
                }
            }
            #endregion

            #region Add plants to biome
            // the amont of oak trees
            int amontOfOakTrees = random.Next(5, 20);

            for (int i = 0; i < amontOfOakTrees; i++)
            {
                // Create a new Oak Trees
                Plants.PlantOakTree newOakTree = new Plants.PlantOakTree();
                newOakTree.identifier.name = "tree";

                // Make it eather short or tall
                if (random.Next(0, 1) == 0)
                {
                    newOakTree.identifier.descriptiveAdjectives.Add("short");
                }
                else
                {
                    newOakTree.identifier.descriptiveAdjectives.Add("tall");
                }

                newOakTree.identifier.classifierAdjectives.Add("oak");
                chunkToPopulate.AddChild(newOakTree);
            }

            // Decide whether to generate ferns

            // the amont of ferns
            int amontOfFerns = random.Next(12, 24);

            for (int i = 0; i < amontOfFerns; i++)
            {
                // Create a new fern
                Plants.PlantFern newFern = new Plants.PlantFern();
                newFern.identifier.name = "fern";
                chunkToPopulate.AddChild(newFern);
            }

            // the amont of Tall Fescues
            int amontOfTallFescues = random.Next(100, 200);

            for (int i = 0; i < amontOfTallFescues; i++)
            {
                // Create a new Tall Fescue
                Plants.PlantTallFescue newTallFescue = new Plants.PlantTallFescue();
                newTallFescue.identifier.name = "grass";
                newTallFescue.identifier.descriptiveAdjectives.Add("tall");
                newTallFescue.identifier.classifierAdjectives.Add("fescue");
                chunkToPopulate.AddChild(newTallFescue);
            }

            // the amont of oak Branches
            int amontOfOakBranches = random.Next(1, 3);

            for (int i = 0; i < amontOfOakBranches; i++)
            {
                // Create a new Oak Branches
                Plants.PlantParts.PlantPartOakTree.PlantPartOakTreeBranch newOakBranch = new Plants.PlantParts.PlantPartOakTree.PlantPartOakTreeBranch();
                newOakBranch.identifier.name = "branch";

                // Make it eather short or long
                if (random.Next(0, 1) == 0)
                {
                    newOakBranch.identifier.descriptiveAdjectives.Add("short");
                }
                else
                {
                    newOakBranch.identifier.descriptiveAdjectives.Add("long");
                }

                newOakBranch.identifier.descriptiveAdjectives.Add("fallen");

                newOakBranch.identifier.classifierAdjectives.Add("oak");
                chunkToPopulate.AddChild(newOakBranch);
            }
            #endregion
        }