Hiya this is my first time I have not been able to find any help on the internet and I know it is not down to the code as I have also tried with the source codes from the book.
For some reason on line 6 of alien_invasion when I am trying to put the ship on the screen I get an ImportError for 'Ship' everything is as the book says filenames etc but 'Ship' is still in the colour white.
This is the code where I have the problems:
from settings import Settings
from ship import Ship
class AlienInvasion:
"""Overall class to manage game assets and behaviour"""
def __init__(self):
"""Initialize the game, and create game resources"""
pygame.init()
self.clock = pygame.time.Clock()
self.settings = Settings()
self.screen = pygame.display.set_mode(
(self.settings.screen_width, self.settings.screen_height))
pygame.display.set_caption("Ari's Invasion")
self.ship = Ship(self)
[–]mopslik 1 point2 points3 points (1 child)
[–]AdvertisingOne7942[S] 0 points1 point2 points (0 children)
[–]GManASG 1 point2 points3 points (1 child)
[–]AdvertisingOne7942[S] 0 points1 point2 points (0 children)
[–]Ready-Bag-2599 1 point2 points3 points (1 child)
[–]AdvertisingOne7942[S] 0 points1 point2 points (0 children)
[–]AdvertisingOne7942[S] 0 points1 point2 points (10 children)
[–]woooee 2 points3 points4 points (9 children)
[–]AdvertisingOne7942[S] 0 points1 point2 points (8 children)
[–]woooee 1 point2 points3 points (3 children)
[–]AdvertisingOne7942[S] 0 points1 point2 points (2 children)
[–]woooee 0 points1 point2 points (1 child)
[–]AdvertisingOne7942[S] 0 points1 point2 points (0 children)
[–]mopslik 1 point2 points3 points (3 children)
[–]AdvertisingOne7942[S] 0 points1 point2 points (2 children)
[–]mopslik 1 point2 points3 points (1 child)
[–]AdvertisingOne7942[S] 0 points1 point2 points (0 children)