// --------------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Creates a copy of the given MotivationSet
        /// </summary>
        /// <param name="other">if null, an invalid empty motivation set is created</param>
        public MotivationSet(MotivationSet other) : this()
        {
            if (other == null)
            {
                return;
            }

            _motivations = new List <Motivation>(other._motivations);
            WfLogger.Log(this, LogLevel.DETAILED, "Created new MotiavationSet from another");
        }
Esempio n. 2
0
        // --------------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Creates a set of motiavtions, where each type gets a random motivation
        /// </summary>
        /// <returns></returns>
        public static MotivationSet RandomMotivationSet()
        {
            MotivationSet newMotivationSet = new MotivationSet();

            newMotivationSet._motivations.Clear();

            List <MotivationTypeEnum> allTypes = new List <MotivationTypeEnum>()
            {
                MotivationTypeEnum.STRENGTH, MotivationTypeEnum.FLAW, MotivationTypeEnum.DESIRE, MotivationTypeEnum.FEAR
            };

            foreach (MotivationTypeEnum type in allTypes)
            {
                newMotivationSet._motivations.Add(MotivationFactory.RandomMotivation(type));
            }

            return(newMotivationSet);
        }