class Wall: width: int = 6 height: int = 5 pos: tuple rotated: bool = False material_id: str = "stone" _bw: "BlockWorld" def __init__(self, pos, bw): self.pos = pos self._bw = bw def build(self): x, y, z = self.pos from_pos = (x,y,z) if self.rotated: z += self.width - 1 else: x += self.width - 1 y += self.height-1 to_pos = (x,y,z) self._bw.set_blocks(*from_pos, *to_pos, self.material_id)