Upload files to "/"

main
Danika Ilvija Laganovska 2024-02-23 09:22:44 +00:00
commit f350c4467c
1 changed files with 28 additions and 0 deletions

28
game.py 100644
View File

@ -0,0 +1,28 @@
import pygame
from pygame.locals import QUIT, KEYDOWN, K_ESCAPE
pygame.init()
SCREEN_WIDTH=1000
SCREEN_HEIGHT=1000
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
running = True
surf = pygame.Surface((50, 50))
surf.fill((0, 255, 255))
rect = surf.get_rect
screen.blit(surf, (100, 100))
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()