Add initial window.

This commit is contained in:
paulusja 2026-04-16 14:25:56 +02:00
parent 9bd7d6b23f
commit 0f9efd4d0b

21
snake/main.py Normal file
View File

@ -0,0 +1,21 @@
import pygame
if __name__ == '__main__':
pygame.init()
pygame.display.set_caption('Snake')
surface = pygame.display.set_mode(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
surface.fill((0, 0, 0))
clock.tick(framerate)
pygame.display.flip()