title: Sprite not moving despite inputs in pygame
body: <p>I'm facing a problem in pygame where the sprite is not moving regardless the inputs, i've checked it several times but have no clue what's wrong with it. There are 3 pages, first contains the main loop of the game, second contains the code of player sprite and third contains some game functions.</p>
  <p>main---------page-01</p>
  <pre><code>import pygame
  import sys
  from player import Player
  import game_functions as gf
  
  def run_game():
      # Intialise the game and start the screen
      pygame.init()   
      screen = pygame.display.set_mode((800, 600))
      pygame.display.set_caption(&quot;AmarCreep&quot;)
      
      player = Player(screen)
      
      # Main loop
      while True:
          # Check if user wants to quit
          for event in pygame.event.get():
              if event.type == pygame.QUIT:
                  sys.exit()
                  
          # Navy screen       
          screen.fill((0,0,128))
          
          gf.responses(screen, player)
          player.p_movements()
              
          # Make the player appear
          player.draw_player()
          
          # Make the newly made screen visible
          pygame.display.flip()
      
  run_game()
  </code></pre>
  <p>Player--------------------page-02</p>
  <pre><code>import pygame
  from pygame.sprite import Sprite
  
  
  class Player(Sprite):
      # Initialise the main player
      
      def __init__(self, screen):
          super(Player, self).__init__()
          
          self.screen = screen
          self.screen_rect = screen.get_rect()
          
          # Specifying the position of the player at start 
          self.rect = pygame.Rect(0, 0, 30, 30)
          self.rect.centerx = self.screen_rect.centerx
          self.rect.bottom = 590
          
          self.moving_left = False
          self.moving_right = False
          self.moving_up = False
          
      def p_movements(self):
          
          if self.moving_left:
              self.rect.x -= 5
          if self.moving_right:
              self.rect.x += 5
          if self.moving_up:
              self.rect.y -= 30   
          
      def draw_player(self):
          ''' Draw the player on the screen'''
          pygame.draw.rect(self.screen, (255,255,255), self.rect)
          
              
  </code></pre>
  <p>game_functions------------------page-03</p>
  <pre><code>import pygame
  
  
  def responses(screen, player):
      ''' Check for responses'''
      for event in pygame.event.get():
          if event.type == pygame.KEYDOWN:
              if event.key == pygame.K_UP:
                  player.moving_up == True
                  
              elif event.key == pygame.K_LEFT:
                  player.moving_left == True
                  
              elif event.key == pygame.K_RIGHT:
                  player.moving_right == True
                  
          elif event.type == pygame.KEYUP:
              if event.key == pygame.K_UP:
                  player.moving_up == False
                  
              elif event.key == pygame.K_LEFT:
                  player.moving_left == False
                  
              elif event.key == pygame.K_RIGHT:
                  player.moving_right == False
  </code></pre>