public void ACharacterMayJoinOneOrMoreFactions() { var character = new MeleeFighter(); character.JoinFaction("a"); character.JoinFaction("b"); character.Factions.Should().HaveCount(2); character.Factions.Should().Contain(new[] { "a", "b" }); }
public void PlayersBelongingToTheSameFactionAreConsideredAllies() { var player1 = new MeleeFighter(); var player2 = new MeleeFighter(); player1.JoinFaction("a"); player2.JoinFaction("a"); player1.IsAlliesWith(player2).Should().BeTrue(); }
public void AlliesCanHealOneAnother() { var player1 = new MeleeFighter(); var player2 = new MeleeFighter(); player1.JoinFaction("a"); player2.JoinFaction("a"); player1.CanHeal(player2).Should().BeSuccessful(); player2.CanHeal(player1).Should().BeSuccessful(); }
public void AlliesCannotDealDamageToOneAnother() { var player1 = new MeleeFighter(); var player2 = new MeleeFighter(); player1.JoinFaction("a"); player2.JoinFaction("a"); player1.CanDealDamageTo(player2).Should().BeFailure(); player2.CanDealDamageTo(player1).Should().BeFailure(); }