class Level1(Level):
    def __init__(self):
        super().__init__()
        self.starblocks = pygame.sprite.Group()
        self.collide = pygame.sprite.Group()
        self.ecollide = pygame.sprite.Group()
        self.powerups = pygame.sprite.Group()
        self.movingplatforms = pygame.sprite.Group()
        self.powerupblocks = pygame.sprite.Group()
        self.koopas = pygame.sprite.Group()
        self.blocks = pygame.sprite.Group()
        self.enemies = pygame.sprite.Group()
        self.qbs = pygame.sprite.Group()
        self.pipes = pygame.sprite.Group()
        self.players = pygame.sprite.Group()
        self.allsprites = pygame.sprite.Group()
        self.fblocks = pygame.sprite.Group()
        self.lavas = pygame.sprite.Group()
        self.jump_sound = pygame.mixer.Sound("/Users/joshuahuang/Desktop/112/TP/Jump.wav")
        qb1 = QBlock(300,height-105, 18,18)
        qb2 = QBlock(381,height-105, 18,18)
        qb3 = QBlock(417,height-105, 18,18)
        qb4 = QBlock(399,height-180, 18,18)
        qb5 = QBlock(1193,height-105, 18,18)
        qb6 = QBlock(1445,height-170, 18,18)
        qb7 = QBlock(1780,height-105, 18,18)
        qb8 = QBlock(1834,height-105, 18,18)
        qb9 = QBlock(1834,height-170, 18,18)
        qb10 = QBlock(1888,height-105, 18,18)
        qb11 = QBlock(2284,height-170, 18,18)
        qb12 = QBlock(2302,height-170, 18,18)
        qb13 = QBlock(2711,height-105, 18,18)
        b1 = Block(363,height-105,18,18)
        b2 = Block(399,height-105,18,18)
        b3 = Block(435,height-105,18,18)
        b4 = Block(1175,height-105, 18,18)
        b5 = Block(1211,height-105, 18,18)
        b6 = Block(1229,height-170,18,18)
        b7 = Block(1247,height-170,18,18)
        b8 = Block(1265,height-170,18,18)
        b9 = Block(1283,height-170,18,18)
        b10 = Block(1301,height-170,18,18)
        b11 = Block(1319,height-170,18,18)
        b12 = Block(1337,height-170,18,18)
        b13 = Block(1355,height-170,18,18)
        b14 = Block(1391,height-170,18,18)
        b15 = Block(1409,height-170,18,18)
        b16 = Block(1427,height-170,18,18)
        b17 = Block(1445,height-105,18,18)
        b18 = Block(1600,height-105,18,18)
        b19 = Block(1618,height-105,18,18)
        b20 = Block(2050,height-105,18,18)
        b21 = Block(2140,height-170,18,18)
        b22 = Block(2122,height-170,18,18)
        b23 = Block(2158,height-170,18,18)
        b24 = Block(2266,height-170,18,18)
        b26 = Block(2284,height-105, 18,18)
        b27 = Block(2302,height-105, 18,18)
        b25 = Block(2320,height-170,18,18)
        b28 = Block(2675,height-105, 18,18)
        b29 = Block(2693,height-105, 18,18)
        b30 = Block(2729,height-105, 18,18)
        g1 = Goomba(500,height-60)
        g2 = Koopa(700,height-60,1)
        g3 = Goomba(1200,height-60)
        g4 = Goomba(1550,height-60)
        g5 = Goomba(1800,height-60)
        g6 = Goomba(2550,height-60)
        g7 = Goomba(2800,height-60)
        pipe1 = Pipe(550,height-60, 35, 30)
        pipe2 = Pipe(750,height-80, 35, 50)
        pipe3 = Pipe(950,height-105, 35, 75)
        pipe4 = Pipe(2600,height-60, 35, 30)
        pipe5 = Pipe(2840,height-60, 35, 30)
        lvl1 = "/Users/joshuahuang/Desktop/112/TP/1-1.png"
        self.mario = Player()
        self.mario.set_position(132,height)
        self.background = pygame.image.load(lvl1).convert()
        self.collide.add(g1,g2,g3,g4,g5,g6,g7,qb1,qb2,qb3,qb4,qb5,qb6,qb7,qb8,qb9,qb10,qb11,qb12,qb13,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,pipe1,pipe2,pipe3,pipe4,pipe5)
        self.ecollide.add(qb1,qb2,qb3,qb4,qb5,qb6,qb7,qb8,qb9,qb10,qb11,qb12,qb13,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,pipe1,pipe2,pipe3,pipe4,pipe5)
        self.blocks.add(b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30)
        self.qbs.add(qb1,qb2,qb3,qb4,qb5,qb6,qb7,qb8,qb9,qb10,qb11,qb12,qb13)
        self.powerupblocks.add(qb2,qb5,qb6,qb13)
        self.starblocks.add(b3)
        self.pipes.add(pipe1,pipe2,pipe3,pipe4,pipe5)
        self.players.add(self.mario)
        self.enemies.add(g1,g2,g3,g4,g5,g6,g7)
        self.koopas.add(g2)
        self.allsprites.add(self.mario,g1,g2,g3,g4,g5,g6,g7,qb1,qb2,qb3,qb4,qb5,qb6,qb7,qb8,qb9,qb10,qb11,qb12,qb13,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,pipe1,pipe2,pipe3,pipe4,pipe5)
        self.level_limit = -2687 