import pygame from pygame.sprite import Group from settings import Settings from game_stats import GameStats from scoreboard import Scoreboard from button import Button from ship import Ship import game_functions as gf def run_game(): # 初始化pygame、设置和屏幕对象 pygame.init() ai_settings = Settings()