public void Pack_AttackPlayerDamage() { Pack pack = new Pack("p", 2); Player p = new Player(); // default attack rating is 1, a pack consisting of 2 monsters should result in 100-2*1 = 98 HP p.HP = 100; pack.Attack(p); Assert.AreEqual(98, p.HP); // player should be dead (HP == 0) p.HP = 1; pack.Attack(p); Assert.AreEqual(0, p.HP); }
public void TestPackAttack() { Pack p = new Pack(3, new Node(0, 0), 1, 1); MockCreature c = new MockCreature(new Node(0, 0), 5); p.Attack(c); Assert.AreEqual(2, c.HitPoints); }