Exemplo n.º 1
0
    def build_level_2(self):
        # 1 уровень блоков
        x = 840
        y = 105
        for _ in range(4):
            brick = VerticalBrick((x, y), self.space)
            brick.isBase = True
            self.bricks.append(brick)
            x += 60
        # 2 уровень блоков
        y += 89
        for i in range(3):
            x = 840
            x1 = 960
            for j in range(2):
                if i < 1:
                    self.bricks.append(VerticalBrick((x1, y), self.space))
                self.bricks.append(VerticalBrick((x, y), self.space))
                x += 60
                x1 += 60
            y += 90
        y -= 30
        self.bricks.append(HorizontalBrick((870, y), self.space))
        self.bricks.append(HorizontalBrick((990, 250), self.space))

        self.number_of_balls = 5
Exemplo n.º 2
0
    def build_level_0(self):
        """level 0"""
        # 1 block level
        x = 840
        y = 105
        for _ in range(2):
            brick = VerticalBrick((x, y), self.space)
            brick.isBase = True
            self.bricks.append(brick)
            x += 60
        x -= 30
        for _ in range(2):
            brick = VerticalBrick((x, y), self.space)
            brick.isBase = True
            self.bricks.append(brick)
            x += 60
        # 2 block level
        x = 870
        y += 60
        for _ in range(2):
            self.bricks.append(HorizontalBrick((x, y), self.space))
            x += 89
        # 3 block level
        x = 885
        y += 60
        for _ in range(2):
            self.bricks.append(VerticalBrick((x, y), self.space))
            x += 60
        # 4 block level
        x = 915
        y += 60
        self.bricks.append(HorizontalBrick((x, y), self.space))

        self.number_of_balls = 5
Exemplo n.º 3
0
    def build_level_3(self):
        """level 3"""
        # 1 block level
        x = 840
        y = 105
        for _ in range(4):
            brick = VerticalBrick((x, y), self.space)
            brick.isBase = True
            self.bricks.append(brick)
            x += 60
        # other block levels
        x = 840
        y += 89
        for _ in range(1):
            x = 840
            for _ in range(4):
                self.bricks.append(VerticalBrick((x, y), self.space))
                x += 60
            y += 90
        y -= 30
        self.bricks.append(HorizontalBrick((870, 255), self.space))
        self.bricks.append(HorizontalBrick((990, 255), self.space))
        self.bricks.append(VerticalBrick((900, 315), self.space))
        self.bricks.append(VerticalBrick((960, 315), self.space))
        self.bricks.append(HorizontalBrick((930, 375), self.space))

        self.number_of_balls = 5
Exemplo n.º 4
0
 def build_level_3(self):
     # 1 уровень блоков
     x = 840
     y = 75
     for _ in range(4):
         brick = Brick((x, y), self.space)
         brick.isBase = True
         self.bricks.append(brick)
         x += 60
     # 2 уровень блоков
     y += 29
     for _ in range(4):
         x = 840
         for _ in range(4):
             self.bricks.append(Brick((x, y), self.space))
             x += 60
         y += 29
     # 3 уровень блоков
     self.bricks.append(HorizontalBrick((870, 195), self.space))
     self.bricks.append(HorizontalBrick((990, 195), self.space))
     self.number_of_balls = 5
Exemplo n.º 5
0
    def build_level_0(self):
        # 1 уровень блоков
        x = 840
        y = 105
        for _ in range(2):
            brick = VerticalBrick((x, y), self.space)
            brick.isBase = True
            self.bricks.append(brick)
            x += 60
        x -= 30
        for _ in range(2):
            brick = VerticalBrick((x, y), self.space)
            brick.isBase = True
            self.bricks.append(brick)
            x += 60
        # 2 уровень блоков
        x = 870
        y += 60
        for _ in range(2):
            self.bricks.append(HorizontalBrick((x, y), self.space))
            x += 89
        # 3 уровень блоков
        x = 885
        y += 60
        for _ in range(2):
            self.bricks.append(VerticalBrick((x, y), self.space))
            x += 60
        # 4 уровень блоков
        x = 915
        y += 60
        self.bricks.append(HorizontalBrick((x, y), self.space))
        y += 30
        for _ in range(2):
            self.bricks.append(Brick((x, y), self.space))
            y += 30

        self.number_of_balls = 4
Exemplo n.º 6
0
 def build_level_1(self):
     # 1 уровень блоков
     x = 840
     y = 105
     for _ in range(4):
         brick = VerticalBrick((x, y), self.space)
         brick.isBase = True
         self.bricks.append(brick)
         x += 60
     # другие блоки
     y += 89
     for i in range(1):
         x = 840
         for j in range(4):
             self.bricks.append(VerticalBrick((x, y), self.space))
             x += 60
         y += 90
     y -= 30
     self.bricks.append(HorizontalBrick((870, 255), self.space))
     self.bricks.append(HorizontalBrick((990, 255), self.space))
     self.bricks.append(VerticalBrick((900, 315), self.space))
     self.bricks.append(VerticalBrick((960, 315), self.space))
     self.bricks.append(HorizontalBrick((930, 375), self.space))
     self.number_of_balls = 5