title: Moving Two Rectangles in Pygame
body: <p>I'm trying to make a game and encountered a problem...I can't move the rectangle of player2. The two rectangles are all from the same class</p>
  <pre><code>import pygame,sys
  #........
  class player(object):
      def __init__(self,determination,x1,x2):
          if determination:
              self.rect = pygame.rect.Rect([x1,0,40,5])
          elif determination == 0:
              self.rect = pygame.rect.Rect([x2,475,40,5])
      
      def draw(self,surface,color):
              pygame.draw.rect(screen,color,self.rect,1)
  
      def handle_keys(self,determination):
          for event in pygame.event.get():
              if event.type ==  pygame.KEYDOWN:
                  if event.key == pygame.K_a and determination:
                      self.rect.left = self.rect.left -3
                      self.rect.right = self.rect.right - 3
                  elif event.key == pygame.K_d and determination:
                      self.rect.right = self.rect.right + 3
                      self.rect.left = self.rect.left+ 3
                  elif event.key == pygame.K_LEFT and determination == 0:
                      self.rect.left = self.rect.left -3
                      self.rect.right = self.rect.right - 3
                  elif event.key == pygame.K_RIGHT and determination == 0:
                      self.rect.right = self.rect.right + 3
                      self.rect.left = self.rect.left+ 3
  
  
      player1.handle_keys(1)
      player2.handle_keys(0)
      player1.draw(screen,color1)
      player2.draw(screen,color2)
      #.......
  </code></pre>