Esempio n. 1
0
        public static Planetoid GenerateRandomPlanet(StarSystem parentSystem)
        {
            Planetoid planet = new Planetoid(parentSystem, GetRandomPlanetName(6));

            int numDeposits = RNG.Next(1, 12);

            for (int i = 0; i < numDeposits; i++)
            {
                planet.AddMaterialDeposit(GenerateRandomDeposit());
            }

            int numMoons = RNG.Next(0, 6);

            for (int i = 1; i <= numMoons; i++)
            {
                GenerateRandomMoon(planet, string.Format("{0}-{1}", planet.Name, i));
            }

            return(planet);
        }