вот мой код:
Код: Выделить всё
import sys
import pygame
from settings import Settings
def run_game():
pygame.init()
ai_settings = Settings()
screen = pygame.display.set_mode((ai_settings.screen_width, ai_settings.screen_height))
pygame.display.set_caption("Alien Invasion")
while True:
screen.fill((0,255,0))
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
pygame.display.flip() # same result with .update
run_game()
Подробнее здесь: https://stackoverflow.com/questions/703 ... rect-color
Мобильная версия