Traceback (most recent call last):
File “./alien_invasion.py”, line 30, in <module>
run_game()
File “./alien_invasion.py”, line 14, in run_game
(ai_settings.screen_width, ai_settings.screen_height))
AttributeError: ‘Settings’ object has no attribute ‘screen_width’
Ошибка.
#!/usr/bin/ python3
# -*- coding: utf-8 -*-
class Settings():
"""Класс для хранения всех настроек игры Alien Invasion."""
def _init_(self):
"""Инициализирует настройки игры."""
#Параметры экрана
self.screen_width = 800
self.screen_height = 600
self.bg_color = (230, 230, 230)
И импортируемый файл с параметрами.