title: Class inheritance in python with pygame
body: <p>So I'm working on a hobby game, and i'm not able to get one class to inherit another properly. The file structure is as shown below:</p>
  <pre><code>main.py
  Enemy
      |walker.py
      |genericEnemy.py
  </code></pre>
  <p>main.py calls walker.py, whose main class inherits from genericEnemy.py. Both of their contents are below:</p>
  <p>walker.py</p>
  <pre><code>import pygame
  from .genericEnemy import generic
  
  class walker(generic):
      pass    
  
  </code></pre>
  <p>genericEnemy.py</p>
  <pre><code>'''
      This class controls generic capabilities for all enemies.
      Specific abilities are in the enemy type's class in the superfolder
  '''
  
  import pygame
  
  class generic:
      def __init__(self, speed, pos, size):
          '''
              speed - The entity speed, an int greater than 0
              pos - The (x,y) position of the entity, a list of length 2
              size - The entity hitbox, a list with length 2
          '''
  
          #Movement Variables
          self.speed = speed
          self.currDir = 1
          self.isMoving = True
  
          #Drawing Variables
          self.pos = pos
          self.size = size
  
          #Gravity Variables
          self.isJumping = False
          self.fallCounter = 0
          self.gravityTimer = 0
  
  #==================================================
  
          def draw(self, surface):
              pygame.draw.rect(surface, (255, 0, 0), (self.pos[0], self.pos[1], self.size[0], self.size[1]))
  
  #==================================================
  
          def updateGravity(self):
              self.fallCounter += 1
              
              if self.fallCounter == 8:
                  self.fallCounter = 0
                  self.gravityTimer += 1
  
  #==================================================
  
          def walk(self):
              if self.isMoving:
                  self.pos[0] += self.speed * self.currDir
  
  </code></pre>
  <p>The issue I'm having is that in main when I say:</p>
  <pre><code>SCREEN = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
  ENEMY = walker(6, [120, 1000], [10, 30])
  </code></pre>
  <p>and then later on</p>
  <pre><code>ENEMY.draw(SCREEN)
  </code></pre>
  <p>I get the error: AttributeError: 'walker' object has no attribute 'draw'</p>
  <p>Any help would be greatly appreciated, like I said this is a hobbyist project, so i'm fairly inexperienced in python/pygame</p>