コード例 #1
0
ファイル: Group.cs プロジェクト: bearsbunniesdeath/KpopSim
 /// <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.");
     }
 }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #5
0
ファイル: Group.cs プロジェクト: bearsbunniesdeath/KpopSim
        /// <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);
        }