main
Maksims Stogovs 2026-01-28 12:14:30 +02:00
commit e3e2d18752
1 changed files with 28 additions and 0 deletions

28
main.py 100644
View File

@ -0,0 +1,28 @@
import pygame
from pygame.locals import QUIT, KEYDOWN, K_ESCAPE
pygame.init()
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
running = True
surf = pygame.Surface((50, 50))
surf.fill((0, 255, 0))
# rect = surf.get_rect()
screen.blit(surf, (20, 20))
pygame.display.flip()
while running:
for event in pygame.event.get():
if event.type == KEYDOWN:
if event.key == K_ESCAPE:
running = False
if event.type == QUIT:
running = False
pygame.quit()