求助pygame只运行程序不显示窗体
import pygamefrom pygame.locals import *
import sys
SCREENWIDTH = 822
SCREENHEIGHT = 199
FPS = 30
def mainGame():
score = 0
over = False
global SCREEN, FPSCLOCK
pygame.init()
FPSCLOCK = pygame.time.Clock()
SCREEN = pygame.set_mode((SCREENWIDTH, SCREENHEIGHT))
pygame.display.set_caption('玛丽冒险')
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
FPSCLOCK.tick(FPS)
if __name__ == '__main__':
mainGame