From: Neil Date: Sat, 5 Mar 2016 19:58:33 +0000 (+0200) Subject: Fix names X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=1c447e762b427f53c02c2463afaed2e21ca91d66;p=koperkapel.git Fix names --- diff --git a/koperkapel/gamelib/level.py b/koperkapel/gamelib/level.py index 3df9fe0..23701b9 100644 --- a/koperkapel/gamelib/level.py +++ b/koperkapel/gamelib/level.py @@ -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)