Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. import pygame
  2. import random
  3.  
  4.  
  5. WIDTH = 360
  6. HEIGHT = 480
  7. FPS = 30
  8.  
  9.  
  10.    # RGB = (red, green, blue)
  11. WHITE = (255, 255, 255)
  12. BLACK = (0, 0, 0)
  13. RED = (255, 0, 0)
  14. GREEN = (0, 255, 0)
  15. BLUE = (0, 0, 255)
  16.  
  17.  
  18. pygame.init()
  19. pygame.mixer.init()
  20. screen = pygame.display.set_mode((WIDTH, HEIGHT))
  21. pygame.display.set_caption("My best game")
  22. clock = pygame.time.Clock()
  23.  
  24.  
  25. running = True
  26. while running:
  27.     clock.tick(FPS)
  28.     for event in pygame.event.get():
  29.         if event.type == pygame.QUIT:
  30.             running = False
  31.  
  32.     #Update sprites
  33.    
  34.     screen.fill(RED)
  35.     pygame.display.flip()
  36.  
  37. pygame.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement