Skip to content

Instantly share code, notes, and snippets.

@timurbakibayev
Created January 7, 2021 11:02
Show Gist options
  • Save timurbakibayev/7de6f0c64d7f288b2700d112b7ebfca1 to your computer and use it in GitHub Desktop.
Save timurbakibayev/7de6f0c64d7f288b2700d112b7ebfca1 to your computer and use it in GitHub Desktop.
import pygame
pygame.init()
screen = pygame.display.set_mode((640, 480))
pygame.display.set_caption("Heli")
done = False
clock = pygame.time.Clock()
# LOAD Images Here!
# Initialize some variables
while not done:
# GAME UPDATE
# KEYBOARD AND MOUSE HERE
for event in pygame.event.get():
if event.type == pygame.QUIT:
done = True
screen.fill((255,255,255))
# DRAWING HERE
pygame.draw.rect(screen, (0,255,0) , [20,20,30,40], 2)
# Display what we have drawn before
pygame.display.flip()
clock.tick(30)
pygame.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment