Correct inverted tests during PEP-8

This commit is contained in:
kleph 2016-03-12 15:28:20 +01:00
parent b85477e516
commit 71c95968bc

View file

@ -122,7 +122,7 @@ def generate_tree():
while split_done:
split_done = False
for l in tree:
if l.left_leaf and l.right_leaf:
if not l.left_leaf and not l.right_leaf:
if l.split():
tree.append(l.left_leaf)
tree.append(l.right_leaf)
@ -172,11 +172,11 @@ def draw_tree(t):
"""
for l in t:
# draw only last leaves
if l.left_leaf and l.right_leaf:
if not l.left_leaf and not l.right_leaf:
l.draw(tiles[TILE_ROAD])
for l in t:
# draw only last leaves
if l.left_leaf and l.right_leaf:
if not l.left_leaf and not l.right_leaf:
if l.room:
l.room.draw(tiles[TILE_WALL], tiles[TILE_GROUND])