Ejemplo n.º 1
0
        public void EnsureReproducibility(Person person1, Person person2)
        {
            if (person1.Gender == person2.Gender)
                throw new NotSupportedException("Same-sex reproduction not supported");

            var theMale = person1.Gender == Gender.Male ? person1 : person2;
            var theFemale = person1.Gender == Gender.Female ? person1 : person2;

            const double cockSizeToVaginaDepthThreshold = 0.85;

            var cockSizeToVaginaDepthRatio = (double)theMale.CockSizeInCm / theFemale.VaginaDepthInCm;
            if (cockSizeToVaginaDepthRatio < cockSizeToVaginaDepthThreshold)
                throw new InvalidOperationException("Incompatible reproductive organs");
        }
Ejemplo n.º 2
0
        public Baby CreateBaby(Person person1, Person person2)
        {
            var bioEngine = new BioEngine();
            bioEngine.EnsureReproducibility(person1, person2);

            var splicedDNA = bioEngine.SpliceDNA(person1.DNA, person2.DNA);

            var baby = new Baby()
            {
                Age = 0,
                DNA = splicedDNA,
                Gender = BioEngine.GetRandomGender(),
            };

            return baby;
        }
Ejemplo n.º 3
0
        public static void Main()
        {
            var person1 = new Person()
            {
                Name = "Tore Berntzen",
                Age = 37,
                Gender = Gender.Male,
                CockSizeInCm = 1,
                VaginaDepthInCm = 0,
                DNA = Guid.NewGuid().ToString().Replace("-", ""),
            };

            var person2 = new Person()
            {
                Name = "Random S**t",
                Age = 17,
                Gender = Gender.Female,
                CockSizeInCm = 0,
                VaginaDepthInCm = 100,
                DNA = Guid.NewGuid().ToString().Replace("-", ""),
            };

            var babyFactory = new BabyFactory();
            babyFactory.CreateBaby(person1, person2);
        }