def test_can_attack_reaches_obstacle(self): map = Dungeon("level2.txt", "treasures_file.json", "enemies.json") hero = Hero(name="Panda", title="Dragonslayer", health=100, mana=100, mana_regeneration_rate=2) map.spawn(hero) self.assertFalse(map.can_attack(0, 1, 3))
def test_can_attack_finds_enemy(self): map = Dungeon("level2.txt", "treasures_file.json", "enemies.json") hero = Hero(name="Panda", title="Dragonslayer", health=100, mana=100, mana_regeneration_rate=2) map.spawn(hero) self.assertEqual((2, 0), map.can_attack(1, 0, 2))