Exemple #1
0
        public Person MakeBaby(DateTime born, String Mname, String Fname)
        {
            RaceFactory factory = new RaceFactory();

            var race = factory.CreateRace(Father, Mother);

            Person Child;
            Person ChildsMother;
            Person ChildsFather;

            if (Gender == Riku_fighter.Gender.Genders.female)
            {
                ChildsMother = this;
                ChildsFather = Partner;
            }
            else
            {
                ChildsMother = Partner;
                ChildsFather = this;
            }

            if (Gender != Partner.Gender)
            {
                Probability getGender = new Probability(2);
                if (getGender.rInt == 0)
                {
                    if (Father.Race.GetType() == typeof(Mongoloid))
                    {
                        Child = new Mongoloid(Fname, ChildsFather, ChildsMother, Mother.Gender, born);
                    }
                    else if (Father.Race.GetType() == typeof(Australoid))
                    {
                        Child = new Australoid(Fname, ChildsFather, ChildsMother, Mother.Gender, born);
                    }
                    else if (Father.Race.GetType() == typeof(Negroid))
                    {
                        Child = new Negroid(Fname, ChildsFather, ChildsMother, Mother.Gender, born);
                    }
                    else
                    {
                        Child = new Caucasoid(Fname, ChildsFather, ChildsMother, Mother.Gender, born);
                    }

                    Children.Add(Child);
                    Partner.Children.Add(Child);
                }
                else
                {
                    if (Father.Race.GetType() == typeof(Mongoloid))
                    {
                        Child = new Mongoloid(Mname, ChildsFather, ChildsMother, Father.Gender, born);
                    }
                    else if (Father.Race.GetType() == typeof(Australoid))
                    {
                        Child = new Australoid(Mname, ChildsFather, ChildsMother, Father.Gender, born);
                    }
                    else if (Father.Race.GetType() == typeof(Negroid))
                    {
                        Child = new Negroid(Mname, ChildsFather, ChildsMother, Father.Gender, born);
                    }
                    else
                    {
                        Child = new Caucasoid(Mname, ChildsFather, ChildsMother, Father.Gender, born);
                    }
                    Children.Add(Child);
                    Partner.Children.Add(Child);
                }
                return(Child);
            }
            else
            {
                Child = null;
                return(Child);
            }
        }
Exemple #2
0
        public void CreateHumanity()
        {
            Mongoloid Matthew = new Mongoloid()
            {
                FirstName = "Matthew",
                LastName  = "Elderhorst",
                Father    = null,
                Mother    = null,
                Gender    = Gender.Genders.male,
                Birthdate = new DateTime(1994, 6, 3),
                State     = new Healthy(),
                Race      = new Mongoloid(),
                Children  = new List <Person>()
            };

            Negroid Saskia = new Negroid()
            {
                FirstName = "Saskia",
                LastName  = "Riemeijer",
                Father    = null,
                Mother    = null,
                Gender    = Gender.Genders.female,
                Birthdate = new DateTime(1994, 1, 17),
                State     = new Healthy(),
                Race      = new Negroid(),
                Children  = new List <Person>()
            };

            Caucasoid Marnix = new Caucasoid()
            {
                FirstName = "Marnix",
                LastName  = "Manuel",
                Father    = null,
                Mother    = null,
                Gender    = Gender.Genders.male,
                Birthdate = new DateTime(1996, 4, 23),
                State     = new Healthy(),
                Race      = new Caucasoid(),
                Children  = new List <Person>()
            };

            Australoid Scarlett = new Australoid()
            {
                FirstName = "Scarlett",
                LastName  = "Johansson",
                Father    = null,
                Mother    = null,
                Gender    = Gender.Genders.female,
                Birthdate = new DateTime(1984, 11, 22),
                State     = new Healthy(),
                Race      = new Australoid(),
                Children  = new List <Person>()
            };

            Mongoloid Gwyn = new Mongoloid()
            {
                FirstName = "Gwyn",
                LastName  = "Lord",
                Father    = null,
                Mother    = null,
                Gender    = Gender.Genders.male,
                Birthdate = new DateTime(1994, 6, 3),
                State     = new Healthy(),
                Race      = new Mongoloid(),
                Children  = new List <Person>()
            };

            Negroid Priscilla = new Negroid()
            {
                FirstName = "Priscilla",
                LastName  = "Light",
                Father    = null,
                Mother    = null,
                Gender    = Gender.Genders.female,
                Birthdate = new DateTime(1994, 10, 29),
                State     = new Healthy(),
                Race      = new Negroid(),
                Children  = new List <Person>()
            };

            Caucasoid John = new Caucasoid()
            {
                FirstName = "John",
                LastName  = "Handleiding",
                Father    = null,
                Mother    = null,
                Gender    = Gender.Genders.male,
                Birthdate = new DateTime(1995, 1, 12),
                State     = new Healthy(),
                Race      = new Caucasoid(),
                Children  = new List <Person>()
            };

            Australoid Mable = new Australoid()
            {
                FirstName = "Mable",
                LastName  = "Focus",
                Father    = null,
                Mother    = null,
                Gender    = Gender.Genders.female,
                Birthdate = new DateTime(1994, 6, 23),
                State     = new Healthy(),
                Race      = new Australoid(),
                Children  = new List <Person>()
            };

            Marnix.Partner    = Scarlett;
            Scarlett.Partner  = Marnix;
            Matthew.Partner   = Saskia;
            Saskia.Partner    = Matthew;
            Scarlett.Partner  = Marnix;
            Gwyn.Partner      = Priscilla;
            Priscilla.Partner = Gwyn;
            John.Partner      = Mable;
            Mable.Partner     = John;



            Person Adam    = new Mongoloid("Adam", Matthew, Saskia, Gender.Genders.male, DateTime.Now);
            Person Madison = new Negroid("Madison", Matthew, Saskia, Gender.Genders.female, DateTime.Now);
            Person Jacob   = new Caucasoid("Jacob", Marnix, Scarlett, Gender.Genders.male, DateTime.Now);
            Person Eve     = new Australoid("Eve", Marnix, Scarlett, Gender.Genders.female, DateTime.Now);

            Person James     = new Australoid("James", Gwyn, Priscilla, Gender.Genders.male, DateTime.Now);
            Person Laura     = new Caucasoid("Laura", John, Mable, Gender.Genders.female, DateTime.Now);
            Person Gottard   = new Negroid("Gottard", John, Mable, Gender.Genders.male, DateTime.Now);
            Person Gwynevere = new Mongoloid("Gwynevere", Gwyn, Priscilla, Gender.Genders.female, DateTime.Now);

            Adam.State      = new Healthy();
            Madison.State   = new Healthy();
            Jacob.State     = new Healthy();
            Eve.State       = new Healthy();
            James.State     = new Healthy();
            Laura.State     = new Healthy();
            Gottard.State   = new Healthy();
            Gwynevere.State = new Healthy();

            Marnix.Children.Add(Jacob);
            Marnix.Children.Add(Eve);
            Scarlett.Children.Add(Jacob);
            Scarlett.Children.Add(Eve);
            Matthew.Children.Add(Adam);
            Matthew.Children.Add(Madison);
            Saskia.Children.Add(Adam);
            Saskia.Children.Add(Madison);
            Gwyn.Children.Add(James);
            Gwyn.Children.Add(Gwynevere);
            Priscilla.Children.Add(James);
            Priscilla.Children.Add(Gwynevere);
            John.Children.Add(Laura);
            John.Children.Add(Gottard);
            Mable.Children.Add(Laura);
            Mable.Children.Add(Gottard);

            Humanity.Add(Marnix);
            Humanity.Add(Scarlett);
            Humanity.Add(Matthew);
            Humanity.Add(Saskia);
            Humanity.Add(Gwyn);
            Humanity.Add(Priscilla);
            Humanity.Add(Mable);
            Humanity.Add(John);
            Humanity.Add(Adam);
            Humanity.Add(Eve);
            Humanity.Add(Jacob);
            Humanity.Add(Madison);
            Humanity.Add(James);
            Humanity.Add(Laura);
            Humanity.Add(Gottard);
            Humanity.Add(Gwynevere);

            AliveHumans.Add(Marnix);
            AliveHumans.Add(Scarlett);
            AliveHumans.Add(Matthew);
            AliveHumans.Add(Saskia);
            AliveHumans.Add(Gwyn);
            AliveHumans.Add(Priscilla);
            AliveHumans.Add(Mable);
            AliveHumans.Add(John);
            AliveHumans.Add(Adam);
            AliveHumans.Add(Eve);
            AliveHumans.Add(Jacob);
            AliveHumans.Add(Madison);
            AliveHumans.Add(James);
            AliveHumans.Add(Laura);
            AliveHumans.Add(Gottard);
            AliveHumans.Add(Gwynevere);
        }