'Kills enemy if on a bumped or broken brick'

def check_if_enemy_on_brick(self, brick):

    brick.rect.y -= 5
    enemy = pg.sprite.spritecollideany(brick, self.enemy_group)
    if enemy:
        setup.SFX['kick'].play()
        self.game_info[c.SCORE] += 100
        self.moving_score_list.append(score.Score((enemy.rect.centerx - self.viewport.x), enemy.rect.y, 100))
        enemy.kill()
        self.sprites_about_to_die_group.add(enemy)
        if (self.mario.rect.centerx > brick.rect.centerx):
            enemy.start_death_jump('right')
        else:
            enemy.start_death_jump('left')
    brick.rect.y += 5
