IntelligentTractor/settings.py

32 lines
1020 B
Python
Raw Permalink Normal View History

from cmath import sqrt
2023-06-06 18:52:04 +02:00
import pygame
2023-06-03 22:42:07 +02:00
screen_width = 1368
screen_height = 936
SIZE = (screen_width, screen_height)
2023-06-03 22:42:07 +02:00
SPECIES=["carrot","potato","wheat"]
2023-05-25 18:11:06 +02:00
WEATHER=['slonce','wiatr','snieg','deszcz']
2023-06-03 22:42:07 +02:00
# size in pixels of one tile = 36px/36px
tile = (36, 36)
block_size = 36
road_coords = [0, 5, 10, 15, 20, 25]
field_width = 4
field_height = 4
field_size = field_width*field_height
fields_amount = 25
2023-06-06 18:52:04 +02:00
directions = {0: 'UP', 90: 'RIGHT', 180: 'DOWN', 270: 'LEFT'}
def draw_lines_on_window(background):
for line in range(26):
pygame.draw.line(background, (0, 0, 0), (0, line * block_size), (936, line * block_size))
pygame.draw.line(background, (0, 0, 0), (line * block_size, 0), (line * block_size, screen_height))
pygame.draw.line(background, (0, 0, 0), (968, 285), (1336 , 285))
pygame.draw.line(background, (0, 0, 0), (968, 649), (1336 , 649))
pygame.draw.line(background, (0, 0, 0), (968, 285), (968, 649))
pygame.draw.line(background, (0, 0, 0), (1336, 285), (1336, 649))