Skip to content

Instantly share code, notes, and snippets.

@arpit-omprakash
Last active May 15, 2020 03:58
Show Gist options
  • Save arpit-omprakash/b20a9d3c7c7d30e444f26eb42e50985d to your computer and use it in GitHub Desktop.
Save arpit-omprakash/b20a9d3c7c7d30e444f26eb42e50985d to your computer and use it in GitHub Desktop.
Hello World program in pygame
import pygame, sys
from pygame.locals import *
pygame.init()
DISPLAYSURF = pygame.display.set_mode((400, 300))
pygame.display.set_caption('Hello World!')
while True: # main game loop
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment