public void ShouldGetCashBack()
 {
     const int expectedCash = 145;
     var p = new Player();
     var sword = new Sword();
     EquipmentHelper.EquipEquipment(p, sword);
     EquipmentHelper.SellEquipment(p, p.CharacterEquipment.First(i => i is Sword));
     Assert.IsTrue(p.Cash == expectedCash);
 }
 public void ShouldNotAffordUnaffordableEquipment()
 {
     var p = new Player();
     var s = new Sword();
     if (p.Cash >= s.Price)
     {
         p.SetCash(s.Price-100);
     }
     Assert.IsFalse(EquipmentHelper.CanAffordEquipment(p, s));
 }
 public void ShouldAffordAffordableEquipment()
 {
     var p = new Player();
     var s = new Sword();
     if (p.Cash < s.Price)
     {
         p.AddCash(s.Price);
     }
     Assert.IsTrue(EquipmentHelper.CanAffordEquipment(p, s));
 }
        public void ShouldNotHaveAttackActionWhenOutOfRange()
        {
            var a = new Arena();
            a.BuildArenaFloor(10);
            var c = new Player();
            a.AddCharacterToArena(c, Alliance.TeamOne, 0, 0);
            var o = new Dumbass();
            a.AddCharacterToArena(o, Alliance.TeamTwo, 5, 5);
            var e = new Sword();
            EquipmentHelper.EquipEquipment(c, e);
            var tile = a.SelectFloorTile(o.ArenaLocation.GetTileLocation());
            var actions = c.TargetTileAndSelectActions(tile);

            Assert.IsFalse(actions.Exists(i => i.Name == "Swing"));
        }