title: Why is my pygame application not responding?
body: <p>So I need to create a little game for a school exercise. I'm too lazy to create all the screens in code so I just made png's of all of them and then called them "spelfase" 0, 1 and 2 in my code. Spelfase 0 is the startscreen showing the title of the game and whatnot. Spelfase 1 is the rulescreen showing the rules. Spelfase 2 is the actual game. 
  I'm fairly sure that the code of spelfase 1 is the problem because when I put that code in, my application didn't respond when I pressed the spacebar when I was on the startscreen.</p>
  
  <p>I'm really new to coding so I haven't tried very many things.</p>
  
  <pre><code>spelfase = 0
  clock = pygame.time.Clock()
  while not done:
      if spelfase == 0:
          for event in pygame.event.get():
              if event.type == pygame.QUIT: 
                  done = True 
              elif event.type == pygame.KEYDOWN:
                  if event.key == pygame.K_SPACE:
                      spelfase = 1
  
      screen.fill((255,255,255))
      bordrect = startscherm.get_rect() 
      screen.blit(startscherm, bordrect)
      clock.tick(60)
      pygame.display.flip()
  while not done:
  if spelfase == 1:
      for event in pygame.event.get():
          if event.type == pygame.QUIT: 
              done = True 
          elif event.type == pygame.KEYDOWN:
              if event.key == pygame.K_SPACE:
                  spelfase = 2
  
      screen.fill((255,255,255))
      bordrect = regelscherm.get_rect()
      screen.blit(regelscherm, bordrect) 
      clock.tick(60)
      pygame.display.flip()
  while not done:
      if spelfase == 2:
          for event in pygame.event.get():
              if event.type == pygame.QUIT:
                  done = True 
              elif event.type == pygame.KEYDOWN:
              if event.key == pygame.K_SPACE:
                  print ("Knop: Spatie")
  
                  worp = random.randint(1,6)
                  posities[beurt] += worp
                  if posities[beurt] &gt;= 63:
                      posities[beurt] = 63
                  if beurt == 0:
                      beurt = 1
                  else:
                      beurt = 0
  
              elif event.key == pygame.K_BACKSPACE:
                  print ("Knop: Backspace")
                  beurt = 0
                  worp = 0
                  posities = [0,0]
  
      screen.fill((255,255,255))
      bordrect = bord.get_rect()
      screen.blit(bord, bordrect)
      clock.tick(60)
      pygame.display.flip()
  </code></pre>