def get_exit_level(self):
return self.exit["next level"]
- def is_on_enemy(self, x, y):
+ def enemy_at(self, x, y):
for enemy in self.enemies:
if (x, y) == enemy.game_pos:
return True
added = False
while not added:
if self.can_walk(x, y, 'floor'):
- if not self.is_on_friend(x, y):
- if not self.is_on_enemy(x, y):
+ if not self.friend_at(x, y):
+ if not self.enemy_at(x, y):
added = True
enemy.game_pos = (x, y)
self.enemies.append(enemy)