code/player.py
def jump(self):
        """ Called when user hits 'jump' button. """
        self.snd_jump.play()
        # move down a bit and see if there is a platform below us.
        # Move down 2 pixels because it doesn't work well if we only move down
        # 1 when working with a platform moving down.
        self.rect.y += 2
        platform_hit_list = pygame.sprite.spritecollide(self, self.level.platform_list, False)
        self.rect.y -= 2
        # If it is ok to jump, set our speed upwards
        if len(platform_hit_list) > 0 or self.rect.bottom >= constants.SCREENHEIGHT:
            self.change_y = -6
 Called when user hits 'jump' button. 
Called when user hits 'jump' button.
Called when user hits ' jump ' button .
def jump(self):
        self.snd_jump.play()
        self.rect.y += 2
        platform_hit_list = pygame.sprite.spritecollide(self, self.level.platform_list, False)
        self.rect.y -= 2
        if len(platform_hit_list) > 0 or self.rect.bottom >= constants.SCREENHEIGHT:
            self.change_y = -6
def jump ( self ) : self . snd_jump . play ( ) self . rect . y += 2 platform_hit_list = pygame . sprite . spritecollide ( self , self . level . platform_list , False ) self . rect . y -= 2 if len ( platform_hit_list ) > 0 or self . rect . bottom >= constants . SCREENHEIGHT : self . change_y = - 6
Called when user hits 'jump' button.
Called when user hits ' jump ' button .
""" Called when user hits 'jump' button. """ # move down a bit and see if there is a platform below us. # Move down 2 pixels because it doesn't work well if we only move down # 1 when working with a platform moving down. # If it is ok to jump, set our speed upwards
self