Python Crash Course - Alien Invasion - Error
问题 I am doing the Alien Invasion project in the Python Crash Course book. When I test the code to see if the ship comes on screen the screen starts then shuts down. I have been looking through the code for hours now without finding out why. The game: import sys import pygame from settings import Settings from ship import Ship def run_game(): # Initialize pygame, settings, and screen object pygame.init() ai_settings = Settings() screen = pygame.display.set_mode( (ai_settings.screen_width, ai