title: What is wrong? TypeError: __init__() takes exactly 3 arguments (2 given)
body: <p>Could someone help me spot the error? I have no idead what I've done wrong. </p>
  
  <p>This error only comes up when I'm inside the main.py and try to run the game. </p>
  
  <p>Main Class:</p>
  
  <pre><code>import pygame
  from pygame.locals import *
  from player import *
  from blocks import *
  
  gravity = -4
  
  display_height, display_width = 640, 480
  display = pygame.display.set_mode ((display_height, display_width), 0, 16)
  pygame.display.set_caption("Pixie from Outerspace")
  clock = pygame.time.Clock()
  FPS = 30
  
  player = Player(display_height/2)
  
  levelOne = [
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
  ]
  
  blockList = []
  
  for y in range(0, len(levelOne)):
      for x in range(0, len(levelOne[y])):
          if (levelOne[y][x]==1):
              blockList.append(Block(x*32, y*32))
  
  moveX, moveY = 0, 0
  
  running = True
  
  while running:
          for event in pygame.event.get():
                  if (event.type == pygame.QUIT):
                          running = False
  
                  if (event.type == pygame.KEYDOWN):
                      if (event.key == pygame.K_RIGHT):
                          moveX = 3
                      elif (event.key == pygame.K_LEFT):
                          moveX = -3
  
                      elif (event.key == pygame.K_d):
                          moveX = 10
  
                      elif (event.key == pygame.K_UP):
                          player.jump()
  
                  if (event.type == pygame.KEYUP):
                      if (event.key == pygame.K_RIGHT):
                          moveX = 0
                      elif (event.key == pygame.K_LEFT):
                          moveX = 0
  
                      elif (event.key == pygame.K_d):
                          moveX = 0
  
  
          display.fill(pygame.Color("lightblue3"))
  
          for block in blockList:
              block.render(display)
  
          player.x += moveX
          player.y -= moveY
  
          player.update(gravity, blockList)
          clock.tick(FPS)
          pygame.display.flip()
  
  pygame.quit()
  </code></pre>
  
  <p>Player Class:</p>
  
  <pre><code>import pygame
  
  class Player(object):
  
      def __init__(self, x, y):
          self.x = x
          self.y = y
          self.width = 60
          self.height = 56
          self.velocity = 0
          self.falling = True
          self.onGround = False
          self.pixie0 = pygame.image.load("pixie1.png")
          self.pixie1 = pygame.image.load("pixie2.png")
          self.timeTarget = 10
          self.timeNumber = 0
          self.currentImage = 0
          self.cloud = pygame.image.load("cloud.png")
          self.tree = pygame.image.load("tree.png")
          self.bush = pygame.image.load("bush.png")
  
  
      def jump(self):
          if (self.onGround == False):
              return
          self.velocity = 30
          self.onGround = False
  
  
      def detectCollision(self, x1, y1, w1, h1, x2, y2, w2, h2):
          if (x2 + w2 &gt;= x1 &gt;= x2 and y2 + h2 &gt;= y1 &gt;= y2):
              return True
          elif (x2 + w2 &gt;= x1 + w1 &gt;= x2 and y2 + h2 &gt;= y1 &gt;= y2):
              return True
          elif (x2 + w2 &gt;= x1 &gt;= x2 and y2 + h2 &gt;= y1 + h1&gt;=y2):
              return True
          elif (x2 + w2 &gt;= x1 + w1 &gt;= x2 and y2 + h2 &gt;= y1 + h1&gt;=y2):
              return True
          else:
              return False
  
  
      def update(self, gravity, blockList):
  
          if (self.currentImage == 0):
              self.currentImage += 1
          else: 
              self.currentImage == 0
  
          self.render()
  
  
          if (self.velocity &lt; 0):
              self.falling = True
  
          collision = False
  
          blockX, blockY = 0, 0
  
          for block in blockList:
              collision = self.detectCollision(self.x, self.y, self.width, self.height, block.x, block.y, block.width, block.height)
  
              if (collision == True):
                  blockX = block.x
                  blockY = block.y
                  break
  
          if (collision == True):
              if (self.falling == True):
                  self.falling = False
                  self.onGround = True
                  self.velocity = 0
                  self.y = blockY - self.height
  
          if (self.onGround == False):
              self.velocity += gravity
  
          self.y -= self.velocity
  
  
      def render(self):
          display.blit (self.bush, (270, 367))
          display.blit (self.bush, (440, 367))
          display.blit (self.tree, (70, 232))
          display.blit (self.cloud, (150, 100))
          display.blit (self.cloud, (350, 50))
          display.blit (self.cloud, (450, 150))
          display.blit (self.cloud, (50, 50))
  
          if (self.currentImage == 0):
              display.blit(self.pixie0, (self.x, self.y))
          else:
              display.blit(self.pixie1, (self.x, self.y))
  </code></pre>