From 71c95968bcd0136ec30bcae34e8b58815ebd4b9a Mon Sep 17 00:00:00 2001 From: kleph Date: Sat, 12 Mar 2016 15:28:20 +0100 Subject: [PATCH] Correct inverted tests during PEP-8 --- 02_dynamic_bsp_rooms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/02_dynamic_bsp_rooms.py b/02_dynamic_bsp_rooms.py index 24eada6..d329068 100644 --- a/02_dynamic_bsp_rooms.py +++ b/02_dynamic_bsp_rooms.py @@ -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])