chain is weird
This commit is contained in:
@@ -27,7 +27,7 @@ class PolyCube:
|
||||
for last_addition in self.last_additions:
|
||||
growth_candidates = growth_candidates.union(generate_neighbors(*last_addition))
|
||||
growth_candidates = growth_candidates.difference(self.cubes)
|
||||
realizable_growth = chain(combinations(growth_candidates, i) for i in range(1, max_growth+1))
|
||||
realizable_growth = chain.from_iterable(combinations(growth_candidates, i) for i in range(1, max_growth+1))
|
||||
for addition in realizable_growth:
|
||||
yield PolyCube(self.cubes.union(addition), addition)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user