Ejemplo n.º 1
0
        public void ShouldReturnNameObject()
        {
            //assign
            IAttributeName nameStr = CharacterAttributeName.Strength;

            //assert
            nameStr.Name().Should().Be(new TextObj("STR"));
        }
Ejemplo n.º 2
0
        public void ShouldEquate()
        {
            //assign
            IAttributeName nameStr  = CharacterAttributeName.Strength;
            IAttributeName nameStr2 = CharacterAttributeName.Strength;

            //assert
            nameStr2.Should().Be(nameStr);
        }
Ejemplo n.º 3
0
        public void ShouldNotEquate()
        {
            //assign
            IAttributeName nameStr  = CharacterAttributeName.Strength;
            IAttributeName nameStr2 = CharacterAttributeName.Dexterity;

            //assert
            nameStr2.Should().NotBe(nameStr);
        }
Ejemplo n.º 4
0
 private ICharacterAttribute GetAttributeFromName(IAttributeName name) => _attributes.First(arrib => arrib.MatchesName(name));
Ejemplo n.º 5
0
 public void SetAttribute(IAttributeName attName, IAttributeScore attributeScore)
 {
     _attributes.Remove(GetAttributeFromName(attName));
     _attributes.Add(new CharacterAttribute(attName, attributeScore));
 }
Ejemplo n.º 6
0
 public ICharacterAttribute MatchesName(IAttributeName attributeName) => GetAttributeFromName(attributeName);
Ejemplo n.º 7
0
 public bool MatchesName(IAttributeName attributeName) => attributeName.Equals(_name);
Ejemplo n.º 8
0
 private SavingThrowAttribute(IAttributeName attributeName)
 {
     _attributeName = attributeName;
 }
Ejemplo n.º 9
0
 public CharacterAttribute(IAttributeName name, IAttributeScore value)
 {
     _name  = name;
     _value = value;
 }
Ejemplo n.º 10
0
 public bool MatchesName(IAttributeName attributeName) => true;
Ejemplo n.º 11
0
 public ICharacterAttribute Attribute(IAttributeName attributeName)
 {
     _attributeSet.MatchesName(attributeName).ApplyRacialBonus(_race);
     return(_attributeSet.MatchesName(attributeName));
 }
Ejemplo n.º 12
0
 public void SetAttribute(IAttributeName attName, IAttributeScore attributeScore)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 13
0
 public ICharacterAttribute MatchesName(IAttributeName attributeName)
 {
     return(_attributes.FirstOrDefault(att => att.MatchesName(attributeName)));
 }