public override Human CreatePair(Human s) { return new CoolParent(ParamsHum.Age_Parent, ParamsHum.Name_from_patr(((Student)s).GetPatr()), ParamsHum.size_children, Math.Pow(10.0,((Botan)s).GetRating())); }
public override Human CreatePair(Human s) { return new Parent(ParamsHum.Age_Parent, ParamsHum.Name_from_patr(((Student)s).GetPatr()), ParamsHum.size_children); }
public override Human CreatePair(Human h) { if (ParamsHum.rand.Next(1, 2) == 1) return new Student(ParamsHum.Age_student, ParamsHum.Name_male, true, ParamsHum.Patr_from_name(((Parent)h).GetName())); else return new Student(ParamsHum.Age_student, ParamsHum.Name_female, false, ParamsHum.Patr_from_name(((Parent)h).GetName())); }
public abstract Human CreatePair(Human h);
public override Human CreatePair(Human h) { Human human; if (h is Botan) { hum = new BotanGod(); human = hum.CreatePair(h); humans.Add(human); return human; } else if(h is CoolParent) { hum = new CoolParentGod(); human = hum.CreatePair(h); humans.Add(human); return human; } else if (h is Student) { hum = new StudenGod(); human = hum.CreatePair(h); humans.Add(human); return human; } else { hum = new ParentGod(); human = hum.CreatePair(h); humans.Add(human); return human; } }
public override Human CreatePair(Human h) { if (ParamsHum.rand.Next(1, 2) == 1) return new Botan(ParamsHum.Age_student, ParamsHum.Name_male, true, ParamsHum.Patr_from_name(((Parent)h).GetName()), Math.Log10(((CoolParent)h).GerMoney())); else return new Botan(ParamsHum.Age_student, ParamsHum.Name_female, false, ParamsHum.Patr_from_name(((Parent)h).GetName()), Math.Log10(((CoolParent)h).GerMoney())); }