예제 #1
0
    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
예제 #2
0
    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
예제 #3
0
    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
예제 #4
0
    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))
예제 #5
0
    def __init__(self, **kwargs):
        super().__init__(**kwargs)

        self.size = cl(2), cl(1)
예제 #6
0
 def build(self):
     return self.rect(cl(1), cl(0), cl(2), cl(1), WoodFloor, WoodFloor2,
                      WoodFloor3)
예제 #7
0
    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
예제 #8
0
    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