Advertisement
Isaacmm

Untitled

May 5th, 2022
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import pygame # Import biblioteki pygame
  2. pygame.init() # Inicjalizacja biblioteki
  3.  
  4. SCREEN_WIDTH = 800
  5. SCREEN_HEIGHT = 600
  6.  
  7. screen_surface = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
  8. pygame.display.set_caption("Moja pierwsza gra")
  9.  
  10. game_loop = True
  11. while game_loop:
  12. events = pygame.event.get()
  13. for event in events:
  14. if event.type == pygame.QUIT:
  15. game_loop = False
  16. pygame.display.update()
  17.  
  18. pygame.quit() # Koniec pygame
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement