inteligenty-traktor/program/main.py
2024-03-09 20:02:19 +01:00

22 lines
571 B
Python

import sys
import pygame
from field import Field
if __name__ == "__main__":
pygame.init()
WHITE = (255, 255, 255)
SCREEN_WIDTH, SCREEN_HEIGHT = 1024, 1024
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
field = Field()
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
field.tractor.update()
screen.fill(WHITE)
field.draw(screen)
pygame.display.flip()
pygame.time.Clock().tick(10)