Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import pygame
  2. import random
  3. pygame.init()
  4.  
  5. wielkosc_okna = (400, 350)
  6. okno = pygame.display.set_mode(wielkosc_okna)
  7.  
  8.  
  9. while True:
  10. for event in pygame.event.get():
  11. print(event)
  12. if event.type == pygame.QUIT:
  13. pygame.quit()
  14. quit()
  15. if event.type == pygame.KEYDOWN:
  16. okno.fill((random.randint(0,255),(random.randint(0,255),(random.randint(0,255))
  17.  
  18.  
  19. pygame.display.update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement