39 lines
1002 B
Python
39 lines
1002 B
Python
import pygame
|
|
|
|
from src.world import World
|
|
from src.tractor import Tractor
|
|
from src.settings import Settings
|
|
|
|
|
|
def main():
|
|
pygame.init()
|
|
|
|
settings = Settings()
|
|
world = World(settings)
|
|
tractor = Tractor("Spalinowy", "Nawóz 1", settings)
|
|
|
|
screen = pygame.display.set_mode((settings.screen_width, settings.screen_height))
|
|
pygame.display.set_caption('TRAKTOHOLIK')
|
|
|
|
# background_image = pygame.image.load('assets/images/sky.png')
|
|
# background_image = pygame.transform.scale(background_image, (settings.screen_width, settings.screen_height))
|
|
|
|
run = True
|
|
while run:
|
|
# screen.blit(background_image, (0, 0)) to chyba sie nie przyda, wiec narazie comment
|
|
world.draw_tiles(screen)
|
|
world.draw_lines(screen)
|
|
tractor.draw_tractor(screen)
|
|
|
|
for event in pygame.event.get():
|
|
if event.type == pygame.QUIT:
|
|
run = False
|
|
|
|
pygame.display.update()
|
|
|
|
pygame.quit()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|