Пример #1
0
        public static void PlayDemo()
        {
            FamilyHead Adam        = new FamilyHead("Adam");
            Spouse     Eve         = new Spouse("Eve");
            Family     AdamsFamily = new Family(Adam, Eve);

            FamilyHead John       = new FamilyHead("John");
            Spouse     Grace      = new Spouse("Grace");
            Family     JohnFamily = new Family(John, Grace);

            FamilyHead Stacy       = new FamilyHead("Stacy");
            Spouse     Peter       = new Spouse("Peter");
            Family     StacyFamily = new Family(Stacy, Peter);

            JohnFamily.AddKid(StacyFamily);
            JohnFamily.AddKid(new Kid("Bob"));

            AdamsFamily.AddKid(JohnFamily);

            Kid Lily = new Kid("Lily");

            AdamsFamily.AddKid(Lily);

            Kid Murphy = new Kid("Murphy");

            AdamsFamily.AddKid(Murphy);

            AdamsFamily.Display(1);
        }
Пример #2
0
 public void AddKid()
 {
     playerFamily.AddKid();
 }