def build(self): room = self.fill(CobbleFloor, CobbleFloor2, CobbleFloor3) room.append(CaveDownstairs(pos=(cl(1), cl(1)))) room.append(CaveSignDown(pos=(cl(1), cl(2)))) return room
def build(self): room = self.fill(CobbleFloor, CobbleFloor2, CobbleFloor3) room.append(CaveUpstairs(pos=(cl(1), cl(0)))) room.extend( self.npoints((cl(0), cl(0)), (cl(0), cl(2)), (cl(2), cl(0)), (cl(2), cl(2)), classes=(Smooth, Cobble))) return room
def build(self): area = self.rect(cl(1), cl(0), cl(2), cl(3), WoodFloor, WoodFloor2, WoodFloor3) area.extend( self.npoints((cl(1), cl(1)), classes=(CaveRails, CaveRails2))) area.extend( self.npoints( (cl(1), cl(0)), (cl(1), cl(2)), classes=(CaveFungus, CaveFungus2, CaveRails, CaveRails2))) return area
def _rect( self, first_x, first_y, second_x, second_y, *classes, **options) -> Generator[Gameobject, None, None]: """ This method fills the selected region. You needn't call it manually. Use `Room.fill` instead. """ real_cell_size = cl(1) cell_size = options.pop('cell', real_cell_size) for x in range(first_x, second_x, cell_size): for y in range(first_y, second_y, cell_size): selected = choice(classes) if selected: yield selected( pos=(x, y))
def __init__(self, **kwargs): super().__init__(**kwargs) self.size = cl(2), cl(1)
def build(self): return self.rect(cl(1), cl(0), cl(2), cl(1), WoodFloor, WoodFloor2, WoodFloor3)
def build(self): room = self.fill(WoodFloor, WoodFloor2, WoodFloor3, BrickFloor, BrickFloor2, BrickFloor3) room.extend( self.npoints((cl(1), cl(1)), classes=(CavePot, CavePot2, CaveRails2, CaveFungus))) room.extend( self.npoints((cl(0), cl(0)), (cl(0), cl(1)), (cl(2), cl(1)), (cl(0), cl(2)), (cl(2), cl(0)), (cl(2), cl(2)), classes=(CaveFungus, CaveFungus2))) return room
def build(self): room = self.fill(CobbleFloor, CobbleFloor2, CobbleFloor3) room.extend( self.npoints((cl(1), cl(0)), (cl(1), cl(2)), classes=(CaveRails, CaveRails2))) room.extend( self.npoints( (cl(0), cl(1)), (cl(2), cl(1)), classes=(CaveFungus, CaveFungus2, CaveGrass, CaveGrass2))) room.extend( self.npoints((cl(0), cl(0)), (cl(0), cl(2)), (cl(2), cl(0)), (cl(2), cl(2)), classes=(Smooth, Cobble))) return room