title: Attribute and Other Errors Found in My Python Code
body: <p>I working with Python right now to build a space invaders project. The errors I'm currently facing is AttributeError: (ai_setting.screen_width, ai_setting.screen_height))  'Settings' object has no attribute 'screen_width' in Python. There's also an error around the &quot;run_game()&quot; part at the bottom. The game is so far supposed to draw a screen and place a ship image at the bottom center of the screen. Thanks!</p>
  <pre><code>import pygame  
  from settings import Settings  
  from ship import Ship  
  import game_functions as gf
  
  def run_game():
      pygame.init()
  
      ai_setting = Settings()
  
  
      #Creating the screen
      screen = pygame.display.set_mode(
          (ai_setting.screen_width, ai_setting.screen_height))
  
      #Creating title
      pygame.display.set_caption(&quot;Space Invasion&quot;)
  
      ship = Ship(screen)
  
  
      #Creating the logo/icon
      icon = pygame.image.load(&quot;space-invaders.png&quot;)
      pygame.display.set_icon(icon)
  
      while True:
          gf.check_events()
          gf.update(ai_setting, screen,ship)
  
  
  run_game()
  </code></pre>
  <p>Above: main.py file</p>
  <pre><code>class Settings():
      def _init__(self):
              self.screen_width = 800
              self.screen_height = 600
              self.bg_color = (0,255,0)
  </code></pre>
  <p>Above: settings.py file</p>
  <pre><code>import pygame
  import sys
  
  def check_events():
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              sys.exit()
  
  def update(ai_settings, screen, ship):
      screen.fill(ai_setting.bg_color)
      ship.blitme
      pygame.display.flip()
  </code></pre>
  <p>Above: game_events.py file</p>
  <pre><code>import pygame
  
  class Ship():
      def __init__(self, screen):
          self.screen = screen
  
          self.image = pygame.image.load(&quot;space-invaders.py&quot;)
          self.rect = self.image.get_rect()
          self.screen_rect = screen.get_rect()
  
          self.rect.centerx = self.screen_rect.centerx
          self.rect.bottom = self.screen_rect.bottom
  
      def blitme(self):
          self.screen.blit(self.image, self.rect)
  </code></pre>
  <p>Above: ship.py file</p>