def hydrate(self, rotation): w, h = self.order[rotation]["dim"] block = array([w, h]) stream = self._stream() for y in self.order[rotation]["y"]: for x in self.order[rotation]["x"]: if stream.next(): block[x][y] = self.color return block
def __init__(self, width, height): self.width = width self.height = height self.well = array([self.width, self.height], None)