title: pygame.draw.circle, still draws a square
body: <p>I'm making a version of <a href="http://agar.io" rel="nofollow">http://agar.io</a> and i'm trying to make the circle shape for the player. I have been trying to use <code>pygame.draw.circle</code> to draw it, however it keeps showing a square. Thanks for help!</p>
  
  <pre><code>import pygame, sys, random
  from pygame.locals import *
  
  # set up pygame
  pygame.init()
  mainClock = pygame.time.Clock()
  
  # set up the window
  width = 600
  height = 800
  screen = pygame.display.set_mode((width, height), 0, 32)
  pygame.display.set_caption('Agar.io')
  
  # set up the colors
  BLACK = (0, 0, 0)
  GREEN = (0, 255, 0)
  WHITE = (255, 255, 255)
  
  # set up the player and food data structure
  foodCounter = 0
  NEWFOOD = 0
  FOODSIZE = 20
  player = pygame.draw.circle(screen, WHITE, (60, 250), 40)
  foods = []
  for i in range(20):
      foods.append(pygame.Rect(random.randint(0, width - FOODSIZE), random.randint(0, height - FOODSIZE), FOODSIZE, FOODSIZE))
  
  # set up movement variables
  moveLeft = False
  moveRight = False
  moveUp = False
  moveDown = False
  
  MOVESPEED = 10
  
  
  # run the game loop
  while True:
      # check for events
      for event in pygame.event.get():
          if event.type == QUIT:
              pygame.quit()
              sys.exit()
          if event.type == KEYDOWN:
              # change the keyboard variables
              if event.key == K_LEFT or event.key == ord('a'):
                  moveRight = False
                  moveLeft = True
              if event.key == K_RIGHT or event.key == ord('d'):
                  moveLeft = False
                  moveRight = True
              if event.key == K_UP or event.key == ord('w'):
                  moveDown = False
                  moveUp = True
              if event.key == K_DOWN or event.key == ord('s'):
                  moveUp = False
                  moveDown = True
          if event.type == KEYUP:
              if event.key == K_ESCAPE:
                  pygame.quit()
                  sys.exit()
              if event.key == K_LEFT or event.key == ord('a'):
                  moveLeft = False
              if event.key == K_RIGHT or event.key == ord('d'):
                  moveRight = False
              if event.key == K_UP or event.key == ord('w'):
                  moveUp = False
              if event.key == K_DOWN or event.key == ord('s'):
                  moveDown = False
              if event.key == ord('x'):
                  player.top = random.randint(0, height - player.height)
                  player.left = random.randint(0, width - player.width)
  
          if event.type == MOUSEBUTTONUP:
              foods.append(pygame.Rect(event.pos[0], event.pos[1], FOODSIZE, FOODSIZE))
  
      foodCounter += 1
      if foodCounter &gt;= NEWFOOD:
          # add new food
          foodCounter = 0
          foods.append(pygame.Rect(random.randint(0, width - FOODSIZE), random.randint(0, height - FOODSIZE), FOODSIZE, FOODSIZE))
  
      # draw the black background onto the surface
      screen.fill(BLACK)
  
      # move the player
      if moveDown and player.bottom &lt; height:
          player.top += MOVESPEED
      if moveUp and player.top &gt; 0:
          player.top -= MOVESPEED
      if moveLeft and player.left &gt; 0:
          player.left -= MOVESPEED
      if moveRight and player.right &lt; width:
          player.right += MOVESPEED
  
      # draw the player onto the surface
      pygame.draw.rect(screen, WHITE, player)
  
      # check if the player has intersected with any food squares.
      for food in foods[:]:
          if player.colliderect(food):
              foods.remove(food)
              player.width+=1
              player.height+=1
  
      # draw the food
      for i in range(len(foods)):
          pygame.draw.rect(screen, GREEN, foods[i])
  
      # draw the window onto the screen
      pygame.display.update()
      mainClock.tick(40)
  </code></pre>