22 lines
484 B
Python
22 lines
484 B
Python
import pygame
|
|
from window import Window
|
|
from input_manager import InputManager
|
|
|
|
|
|
if __name__ == '__main__':
|
|
window = Window(title='Snake', size=(800, 600), background_color=(0, 128, 0))
|
|
input_manager = InputManager()
|
|
|
|
clock = pygame.time.Clock()
|
|
framerate = 25
|
|
|
|
last_input = None
|
|
|
|
while last_input != InputManager.QUIT:
|
|
last_input = input_manager.process_input()
|
|
|
|
window.reset()
|
|
|
|
clock.tick(framerate)
|
|
pygame.display.flip()
|