diff --git a/02_dynamic_bsp_rooms.py b/02_dynamic_bsp_rooms.py index 146a9ab..bd18e34 100644 --- a/02_dynamic_bsp_rooms.py +++ b/02_dynamic_bsp_rooms.py @@ -45,7 +45,7 @@ class Leaf: return False split_point = random.randint(MIN_LEAF_SIZE, self.width - MIN_LEAF_SIZE) self.left_leaf = Leaf(self.x, self.y, split_point, self.height, self.id+1) - self.right_leaf = Leaf(self.x + split_point-1, self.y, self.width - split_point+1, self.height, self.id+2) + self.right_leaf = Leaf(self.x + split_point, self.y, self.width - split_point, self.height, self.id+2) else: # y @@ -53,7 +53,7 @@ class Leaf: return False split_point = random.randint(MIN_LEAF_SIZE, self.height - MIN_LEAF_SIZE) self.left_leaf = Leaf(self.x, self.y, self.width, split_point, self.id+1) - self.right_leaf = Leaf(self.x, self.y + split_point-1, self.width, self.height - split_point+1, self.id+2) + self.right_leaf = Leaf(self.x, self.y + split_point, self.width, self.height - split_point, self.id+2) return True