pygame oop template code example
Example: pygame template
import pygame,sys
#game initialization
pygame.init()
window = pygame.display.set_mode((900,600),0,32)
pygame.display.set_caption('Basic Pygame Template')
clock = pygame.time.Clock()
#game loop
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
#game code here
pygame.display.update()
clock.tick(60)