public void Random_character_is_valid() { for (var i = 0; i < 10; i++) { var sut = DndCharacter.Generate(); Assert.InRange(sut.Strength, 3, 18); Assert.InRange(sut.Dexterity, 3, 18); Assert.InRange(sut.Constitution, 3, 18); Assert.InRange(sut.Intelligence, 3, 18); Assert.InRange(sut.Wisdom, 3, 18); Assert.InRange(sut.Charisma, 3, 18); Assert.Equal(sut.Hitpoints, 10 + DndCharacter.Modifier(sut.Constitution)); } }
public void Ability_modifier_for_score_18_is_4() { Assert.Equal(4, DndCharacter.Modifier(18)); }
public void Ability_modifier_for_score_17_is_3() { Assert.Equal(3, DndCharacter.Modifier(17)); }
public void Ability_modifier_for_score_3_is_minus_4() { Assert.Equal(-4, DndCharacter.Modifier(3)); }
public void Ability_modifier_for_score_15_is_2() { Assert.Equal(2, DndCharacter.Modifier(15)); }
public void Ability_modifier_for_score_13_is_1() { Assert.Equal(1, DndCharacter.Modifier(13)); }
public void Ability_modifier_for_score_11_is_0() { Assert.Equal(0, DndCharacter.Modifier(11)); }
public void Ability_modifier_for_score_9_is_minus_1() { Assert.Equal(-1, DndCharacter.Modifier(9)); }
public void Ability_modifier_for_score_7_is_minus_2() { Assert.Equal(-2, DndCharacter.Modifier(7)); }
public void Ability_modifier_for_score_5_is_minus_3() { Assert.Equal(-3, DndCharacter.Modifier(5)); }