refactoring
This commit is contained in:
parent
4bc295b212
commit
11fc63035d
@ -52,7 +52,8 @@ class BoxSplitter:
|
||||
|
||||
def __split_and_recurse(self, box, step):
|
||||
new_boxes = self.__random_split(box)
|
||||
return chain.from_iterable(self.__tree_recurse(new_boxes, step + 1))
|
||||
new_boxes_per_branch = self.__tree_recurse(new_boxes, step + 1)
|
||||
return chain.from_iterable(new_boxes_per_branch)
|
||||
|
||||
def __random_split(self, box):
|
||||
splitter = random.choice([self.__split_horizontal, self.__split_vertical])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user