title: Quick debugging question [Python, pygame]
body: <p>It's still an incomplete program, but for some reason the value of the textbox doesn't increase when it should... Why is this??
  When the Pizza sprite overlaps with the Pan sprite, the score in the textbox is supposed to increase in value by 10. Why does this not occur?</p>
  
  <p>Thanks!    </p>
  
  <pre><code>'''
  Created on Jul 1, 2011
  
  @author: ******* Louis
  '''
  #Watch me do.
  from livewires import games, color
  import random
  
  games.init (screen_width = 640, screen_height = 480, fps = 50)
  
  #Pizza Class
  class Pizza (games.Sprite):
      pizzaimage = games.load_image ("pizza.bmp", transparent = True)
      def __init__(self, x = random.randrange(640), y = 90, dy = 4):
          super (Pizza, self).__init__(x = x, 
                                       y = y,
                                       image = Pizza.pizzaimage, 
                                       dy = dy)
  
      def handle_caught (self):
          self.destroy()
  
  
  class Pan (games.Sprite):
      panimage = games.load_image ("pan.bmp", transparent = True)
      def __init__ (self, x = games.mouse.x, y = games.mouse.y):
          super (Pan, self).__init__(x = x, 
                                     y = y, 
                                     image = Pan.panimage)
          self.score = 0
          self.textbox = games.Text (value = str(self.score),
                                      size = 20,
                                      color = color.black,
                                      x = 550,
                                      y = 50)
          games.screen.add(self.textbox)
  
  
      def update (self): #WWWWOW There is actually an *update* method
          self.x = games.mouse.x
          self.y = games.mouse.y
  
          if self.left &lt; 0:
              self.left = 0
          if self.right &gt;640:
              self.right = 640
          if self.top &lt; 0:
              self.top = 0
          if self.bottom &gt; 480:
              self.bottom = 480 
          self.check_collision()
  
      def check_collision (self):
          for Pizza in self.overlapping_sprites:
              self.score = self.score + 10
              Pizza.handle_caught()
  
  
  #main
  def main():
      wallbackground = games.load_image ("wall.jpg", transparent = False)
      games.screen.background = wallbackground
  
      games.screen.add(Pizza())
  
      games.screen.add(Pan())
      games.mouse.is_visible = False
      games.screen.event_grab = True
  
      games.screen.mainloop()
  main()
  </code></pre>