Skip to content

Commit

Permalink
add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomes committed Oct 26, 2019
1 parent 7fb47dd commit 8bc56ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions game.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ def next_level(self, level):
self._enemies = [
t(p) for t, p in zip(LEVEL_ENEMIES[level], self.map.enemies_spawn)
]
logger.debug(self._enemies)
logger.debug("Enemies: %s", [(e._name, e.pos) for e in self._enemies])
logger.debug("Walls: %s", self.map.walls)

def quit(self):
logger.debug("Quit")
Expand Down Expand Up @@ -308,8 +309,7 @@ async def next_frame(self):
self.collision()

#sanity check
for ep in [e.pos for e in self._enemies if not e._wallpass]:
assert ep not in self.map.walls
assert all([ep not in self.map.walls for ep in [e.pos for e in self._enemies if not e._wallpass]])

self._state = {
"level": self.map.level,
Expand Down

0 comments on commit 8bc56ff

Please sign in to comment.