Esempio n. 1
0
        public int GetBonusFromAttribute(Proficiency proficiency)
        {
            return(AttributesInCharacter.FirstOrDefault(x => x.Proficiency.Name.Equals(proficiency.Name)).ProficiencyPoints);

            /*
             * foreach (var item in AttributesInCharacter)
             * {
             *  if (item.Equals(proficiency.Name))
             *  {
             *      return item.ProficiencyPoints;
             *  }
             * }
             *
             * return 0;*/
        }
 public AttributeInCharacter(Proficiency attributeInCharacter, int proficiencyPoints)
 {
     this.Proficiency       = attributeInCharacter;
     this.ProficiencyPoints = proficiencyPoints;
 }
 public AttributeInCharacter(Proficiency attributeInCharacter)
 {
     this.Proficiency       = attributeInCharacter;
     this.ProficiencyPoints = 0;
 }