Esempio n. 1
0
 /// <summary>
 /// Remove an idol from the group
 /// </summary>
 /// <param name="idol">An idol to remove</param>
 internal void RemoveMember(Idol idol)
 {
     if (_members.Contains(idol))
     {
         _members.Remove(idol);
     }
     else
     {
         throw new SimException("Cannot find idol to remove.");
     }
 }
Esempio n. 2
0
        private static Idol CreateIdolSkeleton(IdolRegistration registration)
        {
            //Verify the registration
            Registar.Validate(registration);

            Idol skeleton = new Idol(registration.Name, registration.FullName, registration.Gender, registration.DOB);

            skeleton.Status = IdolStatus.Trainee;

            return(skeleton);
        }
Esempio n. 3
0
        public static Idol CreateIdol(IdolRegistration registration)
        {
            Idol newIdol = CreateIdolSkeleton(registration);

            newIdol.VisualRating  = new Rating();
            newIdol.SingingRating = new Rating();
            newIdol.DancingRating = new Rating();
            newIdol.SocialRating  = new Rating();

            return(newIdol);
        }
Esempio n. 4
0
        public static Idol CreateIdol(IdolRegistration registration, IdolReportCard reportCard)
        {
            Idol newIdol = CreateIdolSkeleton(registration);

            //Verify the report card
            //TODO

            newIdol.Potential = reportCard.Potential;

            newIdol.VisualRating  = reportCard.VisualRating;
            newIdol.SingingRating = reportCard.SingingRating;
            newIdol.DancingRating = reportCard.DancingRating;
            newIdol.SocialRating  = reportCard.SocialRating;

            return(newIdol);
        }
Esempio n. 5
0
        /// <summary>
        /// Add an idol to the group
        /// </summary>
        /// <param name="idol">An idol to add</param>
        internal void AddMember(Idol idol)
        {
            //Make sure the gender is correct for the group
            if ((Type == GroupType.Boyband && idol.Gender != Gender.Male) ||
                (Type == GroupType.Girlgroup && idol.Gender != Gender.Female))
            {
                throw new SimException("Idol gender does not match group type.");
            }

            //Make sure the member doesn't already exist
            if (_members.Contains(idol))
            {
                throw new SimException("Idol already exists in the group");
            }

            _members.Add(idol);
        }