title: Values of variables don't update properly for new loop in pygame
body: <p>Using pygame and python 3.7, I have created a game in which an image at the center (250, 250) can be dragged around the screen and collide with a radius, in which case a break happens and the next image in the next loop spawns at the exact center, where the first image was located, as well. Despite the game working the way I intended, in principle, it behaves weirdly for fast mouse speed. In my minimal example code, the colored circles are supposed to reappear at the exact center, for every while-loop, however, they somehow don't update properly and therefore reappear not at the center of the screen, most of the time (they only do when I release the mouse-button really early / well-timed). I tested the game on windows and mac and noticed that on my mac, the "lag" seems to be even worse. If anybody knows how I could work around that, I'd be really thankful. Also, the game starts lagging and jumping to the next loop right away for really fast mouse movement, with which I have dealt by changing the speed of my external mouse. Is there an inherent fix for too fast mouse-movement in pygame? Thanks for all suggestions and maybe also other improvements to the idea of my code. </p>
  
  <pre><code>import pygame
  import time
  from time import sleep
  import math
  
  pygame.init()
  
  gameDisplay = pygame.display.set_mode((500, 500))
  
  clock = pygame.time.Clock()
  
  background_surface = pygame.Surface((500, 500))
  
  background_surface.fill((255, 255, 255))
  
  colors = [(0,0,0), (253, 45, 0), (249, 253, 0), (32, 201, 5), (0, 210, 235)]
  
  for color in colors:
  
      done = False
  
      a, b = 250, 250
  
      u, v = 250, 250
  
      while not done:
  
          clock.tick(60)
          for event in pygame.event.get():
              if event.type == pygame.QUIT:
                  done = True
              elif event.type == pygame.MOUSEMOTION:
                  if event.buttons[0]:
                      a += event.rel[0]
                      b += event.rel[1]
  
  
          rect = pygame.Rect(u, v, 0.001, 0.001)
          radius = 200
          corners = [rect.bottomleft, rect.bottomright, rect.topleft, rect.topright]
          dist = [math.sqrt((p[0] - a) ** 2 + (p[1] - b) ** 2) for p in corners]
          p_out = [i for i, d in enumerate(dist) if d &gt; radius]
  
          if any(p_out):
              break
  
          gameDisplay.blit(background_surface, (0, 0))
          pygame.draw.circle(gameDisplay, color, (a,b), 50, 0)
          pygame.draw.circle(gameDisplay, (0,0,0), (250,250), 200, 2)
          pygame.display.flip()
      sleep(0.7)
  
  pygame.quit()
  quit()
  </code></pre>