Fix names
authorNeil <neil@dip.sun.ac.za>
Sat, 5 Mar 2016 19:58:33 +0000 (21:58 +0200)
committerNeil <neil@dip.sun.ac.za>
Sat, 5 Mar 2016 20:01:09 +0000 (22:01 +0200)
koperkapel/gamelib/level.py

index 3df9fe03598dc598db85666491d342370c7b2eee..23701b947c387797c7e1288e88ce367e739c8735 100644 (file)
@@ -87,7 +87,7 @@ class Level(object):
     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
@@ -104,8 +104,8 @@ class Level(object):
         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)