22 lines
433 B
Python
22 lines
433 B
Python
import pygame
|
|
from window import Window
|
|
|
|
|
|
if __name__ == '__main__':
|
|
window = Window(title='Snake', size=(800, 600))
|
|
|
|
clock = pygame.time.Clock()
|
|
framerate = 25
|
|
|
|
shall_abort = False
|
|
|
|
while not shall_abort:
|
|
for event in pygame.event.get():
|
|
if event.type == pygame.QUIT:
|
|
shall_abort = True
|
|
|
|
window.reset()
|
|
|
|
clock.tick(framerate)
|
|
pygame.display.flip()
|