def at_end_of_level(self):
    'Checks if player at end of level, and if so, load the next level.'
    if (self.player_sprite.center_x >= self.end_of_map):
        self.level += 1
        self.setup()
Checks if player at end of level, and if so, load the next level.
def at_end_of_level(self):
    
    if (self.player_sprite.center_x >= self.end_of_map):
        self.level += 1
        self.setup()