title: Making a Snake game (following a tutorial): I get the error, object is not subscriptable
body: <p>So the following code is to make the actual snake with cubes (This passage of code is also the only part with the term <code>self.pos</code> is evident):</p>
  
  <pre><code>class cube (object):
  rows = 20
  w = 500
  
  def __init__(self, start, dirnx=1, dirny=0, colour=(255, 0, 0)):
      self.pos = start
      self.dirnx = 1
      self.dirny = 0
      self.colour = colour
  
  def move(self, dirnx, dirny):
      self.dirnx = dirnx
      self.dirny = dirny
      self.pos = (self.pos[0] + self.dirnx, self.pos[1] + self.dirny)
  
  def draw(self, surface, eyes=False):
      dis = self.w // self.rows
      i = self.pos[0]
      j = self.pos[1]
  
      pygame.draw.rect(surface, self.colour, (i * dis + 1, j * dis + 1, dis - 2, dis - 2))
  
      if eyes:
          centre = dis//2
          radius = 3
          circleMiddle = (i * dis + centre - radius, j * dis + 8)
          circleMiddle2 = (i * dis + dis - radius * 2, j * dis + 8)
          pygame.draw.circle(surface, (0, 0, 0), circleMiddle, radius)
          pygame.draw.circle(surface, (0, 0, 0,), circleMiddle2, radius)
  </code></pre>
  
  <p>When I run the whole programme (which consists of a lot more code), I get this error:</p>
  
  <pre><code>File "/Users/shreevathsagorur/PycharmProjects/FirstStepGameDevelopment/Snake.py", line 30, in draw
  i = self.pos[0]
  TypeError: 'NoneType' object is not subscriptable
  </code></pre>
  
  <p>I would really appreciate the help, as I am very new to this stuff.
  Thank you.</p>