예제 #1
0
        public static SuperHero CreateRandom(Random rng)
        {
            // Console.WriteLine("Started the process of creating a random SuperHero!");

            var heroAlias = RandomHeroAlias(rng);

            var hairStyleRNG = rng.Next(0, 4);

            // if RNG lands on either 2 or 3, then it'll be 'Normal'
            HairStyle hairStyle = HairStyle.Normal;


            switch (hairStyleRNG)
            {
            case 0:

                hairStyle = HairStyle.Covered;
                break;

            case 1:

                hairStyle = HairStyle.Radiant;
                break;
            }

            var hero = SuperHero.CreateInstance(heroAlias, hairStyle);

            hero.RealIdentity = RealIdentity.CreateRandom(hero, rng);

            hero.Quotes = Quote.CreateRandom(rng.Next(0, 10), rng, hero);

            // Console.WriteLine("Finalized the creation of a random SuperHero!");

            return(hero);
        }
예제 #2
0
        // ReSharper disable once InconsistentNaming
        // ReSharper disable once IdentifierTypo
        public static SuperHero CreateAllMightFromBNHA()
        {
            Console.WriteLine("Starting the creation of All Might!");


            var hero = SuperHero.CreateInstance("All Might", HairStyle.Radiant);

            var realIdentify = RealIdentity.CreateInstance(hero, "Toshinori Yagi");

            var quotes = new Quote[]
            {
                Quote.CreateInstance("The Symbol of Peace", QuoteStyle.Cheesy, hero),
                Quote.CreateInstance("UNITED STATES OF SMASH!", QuoteStyle.Awesome, hero),
                Quote.CreateInstance("Because I am here!", QuoteStyle.Cheesy, hero)
            };

            hero.RealIdentity = realIdentify;
            hero.Quotes       = quotes;

            Console.WriteLine("Sucessfully created All Might!");
            return(hero);
        }