import pygame
from pygame.locals import *

pygame.init()

FPS = 60
WIDTH = 500
HEIGHT = 500

clock = pygame.time.Clock()
display = pygame.display.set_mode((WIDTH, HEIGHT))


while True:
    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            exit()

    # code here

    pygame.display.update()
    clock.tick(FPS)
