public static Boolean IsPaarungInzest(Antilopenmann vater, Antilopenfrau mutter) { if (vater == null || vater.Vater == null || vater.Mutter == null || mutter == null || mutter.Mutter == null || mutter.Vater == null) { return(false); } if (vater == mutter.Vater) { return(true); } else if (vater.Vater == mutter.Vater) { return(true); } else if (mutter == mutter.Mutter) { return(true); } else if (mutter.Mutter == mutter.Mutter) { return(true); } else { return(false); } }
public Antilopenmann(Antilopenfrau mutter, Antilopenmann vater) { this.Geschlecht = enGeschlecht.Maennchen; this.Name = exAntilope.CreateName(this.Geschlecht); this.Mutter = mutter; this.Vater = vater; this.Generation = this.Vater.Generation + 1; }
public Antilopenfrau(Antilopenfrau mutter, Antilopenmann vater) { this.Geschlecht = enGeschlecht.Weibchen; this.Name = exAntilope.CreateName(this.Geschlecht); this.Vater = vater; this.Mutter = mutter; this.Generation = this.Vater.Generation + 1; this.Condition = exAntilope.CreateConditionOfBaby(this.Vater, this.Mutter); }
public IAntilope MakeBabyWith(Antilopenmann father) { IAntilope b; if (exAntilope.CreateSex() == enGeschlecht.Maennchen) { b = new Antilopenmann(this, father); } else { b = new Antilopenfrau(this, father); } return(b); }
public Herde() { Antilopenfrau urmama, urmama2; Antilopenmann urvater, urvater2; urmama = new Antilopenfrau(); urvater = new Antilopenmann(); urmama2 = new Antilopenfrau(); urvater2 = new Antilopenmann(); Tribe.Add(urmama); Tribe.Add(urmama2); Tribe.Add(urvater); Tribe.Add(urvater2); }
public static Condition CreateConditionOfBaby(Antilopenmann vater, Antilopenfrau mutter) { Condition child; child.Beauty = 10; child.Alter = 1; child.Fun = 10; child.Health = 10; if (mutter == null & vater != null) { child.Beauty = vater.Condition.Beauty; } else if (vater == null & mutter != null) { child.Beauty = mutter.Condition.Beauty; } else { child.Beauty = System.Math.Abs(mutter.Condition.Beauty - (vater.Condition.Beauty / 2)); } return(child); }