public Person() { myName = new Name(6); myEyes = NewEyes(); myHair = NewHair(); itsGender = NewGender(); mySize = NewSize(); myPrefs = new Preferences(); myThoughtBubble = NewThoughts(); myAge = 18.0; MomsName = new Name(3); DadsName = new Name(3); myChildrensNames = new List<Name>(); }
public Person(Person mom, Person dad) { myName = new Name(mom.Name, dad.Name); myEyes = NewEyes(mom.Eyes, dad.Eyes); myHair = NewHair(mom.Hair, dad.Hair); itsGender = NewGender(); mySize = NewSize(mom.Size, dad.Size); if (itsGender == Gender.Male) { myPrefs = new Preferences(mom); } else { myPrefs = new Preferences(dad); } myAge = 0.0; MomsName = mom.Name; DadsName = dad.Name; myChildrensNames = new List<PopSim2.Name>(); mom.NewChild(this); dad.NewChild(this); myThoughtBubble = NewThoughts(mom, dad); }
public Name(Name momsName, Name dadsName) { Name firstname = new Name(5); itsValue = firstname.ToString(); if (momsName.DadsSurname==string.Empty || momsName.DadsSurname==null) { itsValue = itsValue + " " + momsName.ToString(); } else { itsValue = itsValue + " " + momsName.DadsSurname; } if (dadsName.DadsSurname ==string.Empty || dadsName.DadsSurname==null) { itsValue = itsValue + "-" + dadsName.ToString(); itsDadsSurname = dadsName.ToString(); } else { itsValue = itsValue + "-" + dadsName.DadsSurname; itsDadsSurname = dadsName.DadsSurname; } }