def test_with_same_x_column_and_hero_is_below_enemy_should_increase_enemy_y_with_1( self): h = Hero(name="Bron", title="Dragonslayer", health=100, mana=100, mana_regeneration_rate=2) h.x = 3 h.y = 5 enemy = Enemy(health=100, mana=40, damage=20) enemy.x = 3 enemy.y = 3 fight = Fight(enemy) fight.move_enemy_one_step(h) expected_y = 4 self.assertEqual(enemy.y, expected_y)
def test_with_same_y_level_and_hero_on_the_right_should_increase_enemy_x_with_1( self): h = Hero(name="Bron", title="Dragonslayer", health=100, mana=100, mana_regeneration_rate=2) h.x = 5 h.y = 3 enemy = Enemy(health=100, mana=40, damage=20) enemy.x = 3 enemy.y = 3 fight = Fight(enemy) fight.move_enemy_one_step(h) expected_x = 4 self.assertEqual(enemy.x, expected_x)