Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.region.height, resolution=6, octaves=2)
center = random_normal_int(
self.region.center().x, self.region.width / 4 / 3)
for y in self.region.range_height():
center += (center_factory(y) - 0.5) * 3
width = width_factory(y) * 2 + 5
x0 = int(center - width / 2)
x1 = int(x0 + width + 0.5)
for x in range(x0, x1 + 1):
self.map_canvas.set_architecture(Point(x, y), e.Water)
left_side[y] = (Span(self.region.left, x0 - 1),)
right_side[y] = (Span(x1 + 1, self.region.right),)
river[y] = (Span(x0, x1),)
return Blob(left_side), Blob(river), Blob(right_side)
def __eq__(self, other):
if not isinstance(other, Blob):
return NotImplemented
return self.spans == other.spans