import pygame #导入pygame模块 pygame.init()#初始化 screen = pygame.display.set_mode((750,750))#设置游戏屏幕大小 running = True#建立一个事件 while running:#事件运行for event in pygame.event.get():if event.type == pygame.QUIT:#当点击事件后退出running = False #事件关闭screen.fill([125,95,24])#给屏幕画上颜色for x in range(15):#画出15条竖线pygame.draw.line(screen, (255, 0, 0),[25+50*x,25],[25+50*x,725],2)for y in range(15):#画出15条横线pygame.draw.line(screen, (255, 0, 0),[25,25+50*y],[725,25+50*y],2)pygame.draw.circle(screen, (255, 0, 0),[25+50*7,25+50*7],8)#棋盘中间画出一个中心点pygame.display.update()#刷新,变色用的pygame.quit()#退出游戏