title: 'tuple' object is not callable - Pygame
body: <p>I have, yet again, run into a problem while coding a game in pygame.</p>
  
  <p>While dealing with the function that allows the player to shoot, I keep getting this error: 'tuple' object is not callable'</p>
  
  <p>In my main program, the 'loop' subroutine:</p>
  
  <pre><code>play=True
  
      sprites,platforms,player1=GameClass.Game.run('')  # Player 1 is defined here.
  
      display.fill(WHITE)
      GameClass.Game.restart(player1)
      display.fill(WHITE)
  
  
      while play:
          display.fill(WHITE)
          GameClass.Game.getevent(player1)
          platforms.draw(display)
          sprites.draw(display)
          pygame.display.update()
  
          collision=pygame.sprite.spritecollide(player1,platforms, False)
          if collision:
              player1.updateposition(True,False)
  
          else:
              player1.updateposition(False,False)
  </code></pre>
  
  <p>As you can see, player1 is defined. I then call GameClass.Game.getevent, which has self as a parameter.</p>
  
  <p>I pass player 1 through the code and get to this line:</p>
  
  <pre><code>if event.type==pygame.MOUSEBUTTONDOWN:
                  if event.button==1:
                      PlayerClasses.Player.shoot(self)
  </code></pre>
  
  <p>As self is still assigned to player1, it moves through to the final section, the bullet class.</p>
  
  <pre><code>class Bullet(pygame.sprite.Sprite):
  
      def __init__(self,speed,Game):
  
          self.speed=speed
          self.image=pygame.Surface((10,10))
          self.rect=self.image.get_rect()
          #self.x,self.y=Player.exportlocation(player1)
  
      def movebullet(self):
          self.rect.center((self.x+self.speed),self.y)
  </code></pre>
  
  <p>I get the error:</p>
  
  <p>(There is more up here if needed)</p>
  
  <pre><code> File "C:\Users\Luke\Desktop\Year13CA\Base.py", line 293, in loop
      GameClass.Game.getevent(player1)
    File "C:\Users\Luke\Desktop\Year13CA\GameClass.py", line 64, in getevent
      PlayerClasses.Player.shoot(self)
    File "C:\Users\Luke\Desktop\Year13CA\PlayerClasses.py", line 77, in shoot
      Bullet.movebullet(self)
    File "C:\Users\Luke\Desktop\Year13CA\PlayerClasses.py", line 96, in movebullet
      self.rect.center((self.x+self.speed),self.y)
  TypeError: 'tuple' object is not callable
  </code></pre>
  
  <p>I do not know why this problem occurs.</p>
  
  <p>Many thanks,
  Luke</p>