Correct inverted tests during PEP-8
This commit is contained in:
parent
b85477e516
commit
71c95968bc
1 changed files with 3 additions and 3 deletions
|
@ -122,7 +122,7 @@ def generate_tree():
|
||||||
while split_done:
|
while split_done:
|
||||||
split_done = False
|
split_done = False
|
||||||
for l in tree:
|
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():
|
if l.split():
|
||||||
tree.append(l.left_leaf)
|
tree.append(l.left_leaf)
|
||||||
tree.append(l.right_leaf)
|
tree.append(l.right_leaf)
|
||||||
|
@ -172,11 +172,11 @@ def draw_tree(t):
|
||||||
"""
|
"""
|
||||||
for l in t:
|
for l in t:
|
||||||
# draw only last leaves
|
# 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])
|
l.draw(tiles[TILE_ROAD])
|
||||||
for l in t:
|
for l in t:
|
||||||
# draw only last leaves
|
# 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:
|
if l.room:
|
||||||
l.room.draw(tiles[TILE_WALL], tiles[TILE_GROUND])
|
l.room.draw(tiles[TILE_WALL], tiles[TILE_GROUND])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue