public void ShouldReturnNameObject() { //assign IAttributeName nameStr = CharacterAttributeName.Strength; //assert nameStr.Name().Should().Be(new TextObj("STR")); }
public void ShouldEquate() { //assign IAttributeName nameStr = CharacterAttributeName.Strength; IAttributeName nameStr2 = CharacterAttributeName.Strength; //assert nameStr2.Should().Be(nameStr); }
public void ShouldNotEquate() { //assign IAttributeName nameStr = CharacterAttributeName.Strength; IAttributeName nameStr2 = CharacterAttributeName.Dexterity; //assert nameStr2.Should().NotBe(nameStr); }
private ICharacterAttribute GetAttributeFromName(IAttributeName name) => _attributes.First(arrib => arrib.MatchesName(name));
public void SetAttribute(IAttributeName attName, IAttributeScore attributeScore) { _attributes.Remove(GetAttributeFromName(attName)); _attributes.Add(new CharacterAttribute(attName, attributeScore)); }
public ICharacterAttribute MatchesName(IAttributeName attributeName) => GetAttributeFromName(attributeName);
public bool MatchesName(IAttributeName attributeName) => attributeName.Equals(_name);
private SavingThrowAttribute(IAttributeName attributeName) { _attributeName = attributeName; }
public CharacterAttribute(IAttributeName name, IAttributeScore value) { _name = name; _value = value; }
public bool MatchesName(IAttributeName attributeName) => true;
public ICharacterAttribute Attribute(IAttributeName attributeName) { _attributeSet.MatchesName(attributeName).ApplyRacialBonus(_race); return(_attributeSet.MatchesName(attributeName)); }
public void SetAttribute(IAttributeName attName, IAttributeScore attributeScore) { throw new NotImplementedException(); }
public ICharacterAttribute MatchesName(IAttributeName attributeName) { return(_attributes.FirstOrDefault(att => att.MatchesName(attributeName))); }