title: How to move Sprite in Pygame
body: <p>im trying to get my image (bird) to move up and down on the screen but i cant figure out how to do it here is what i tried im sure its way off but im trying to figure it out if anyone can help that would be great!</p>
  
  <pre><code>import pygame
  import os
  
  screen = pygame.display.set_mode((640, 400))
  
  running = 1
  
  while running:
      event = pygame.event.poll()
      if event.type == pygame.QUIT:
          running = 0
      screen.fill([255, 255, 255])
      clock = pygame.time.Clock()
      clock.tick(0.5)
      pygame.display.flip()
  
      bird = pygame.image.load(os.path.join('C:\Python27', 'player.png'))
      screen.blit( bird, ( 0, 0 ) )
  
      pygame.display.update()
  
  class game(object):
      def move(self, x, y):
          self.player.center[0] += x
          self.player.center[1] += y
  
  
      if event.key == K_UP:
          player.move(0,5)
      if event.key == K_DOWN:
          player.move(0,-5)
  
  game()
  </code></pre>
  
  <p>im trying to get it to move down on the down button press and up on the UP key press</p>