Код:
import pygame
import sys
from gun import Gun
def run():
pygame.init()
screen = pygame.display.set_mode((1200, 800))
pygame.dysplay.set_caption("Космические защитники")
bg_color = (0, 0, 0)
gun = Gun(screen)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
screen.fill(bg_color)
gun.output()
pygame.display.flip()
run()
Ошибка:
Traceback (most recent call last):
File "D:\Python code\my 1 game.py", line 23 in <module>
run()
File "D:\Python code\my 1 game.py", line 9, in run
pygame.display.set_caption("Космические защитники")
AttributeError: module 'pygame' has no attribute 'dysplay'. Did you mean: 'display' ?