minor changes

This commit is contained in:
secret_dude 2021-05-31 21:09:45 +02:00
parent 01dae9185b
commit e75de81fbd
3 changed files with 7 additions and 7 deletions

View File

@ -4,14 +4,14 @@
from math import ceil, floor from math import ceil, floor
DISPLAY_SIZE_HORIZONTAL = 1600 DISPLAY_SIZE_HORIZONTAL = 1600
DISPLAY_SIZE_VERTICAL = 800 DISPLAY_SIZE_VERTICAL = 1000
#TILE DIVIDER = TILE SIZE #TILE DIVIDER = TILE SIZE
TILE_SIZE = 100 TILE_SIZE = 100
# number of tiles # number of tiles
HORIZONTAL_TILES_NUMBER = ceil(DISPLAY_SIZE_HORIZONTAL/TILE_SIZE) HORIZONTAL_TILES_NUMBER = floor((DISPLAY_SIZE_HORIZONTAL)/TILE_SIZE)
VERTICAL_TILES_NUMBER = floor((DISPLAY_SIZE_VERTICAL-200)/TILE_SIZE) VERTICAL_TILES_NUMBER = floor((DISPLAY_SIZE_VERTICAL-400)/TILE_SIZE)
#TILE_SIZE #TILE_SIZE

View File

@ -31,19 +31,19 @@ def drawInfo(display, tractor, tillageUnit, field, direction, weather, day_time,
text = f"(Q)Hitches: {hitches} (W)Header: {tractor.header} (R)Engine working: {tractor.engineWorking} (T)Autodrive: {tractor.autodrive} Fuel: {tractor.fuel_tank}" text = f"(Q)Hitches: {hitches} (W)Header: {tractor.header} (R)Engine working: {tractor.engineWorking} (T)Autodrive: {tractor.autodrive} Fuel: {tractor.fuel_tank}"
textsurface = myfont.render(text, False, (0, 0, 0)) textsurface = myfont.render(text, False, (0, 0, 0))
display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 200))) display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 400)))
text = f"(E)Tillage Unit Load: {tillageUnit.load} (^) Direction: {direction}" text = f"(E)Tillage Unit Load: {tillageUnit.load} (^) Direction: {direction}"
textsurface = myfont.render(text, False, (0, 0, 0)) textsurface = myfont.render(text, False, (0, 0, 0))
display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 150))) display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 350)))
text = f"Current field: {field.horizontal_index/100, field.vertical_index/100, field.state} Action: {decision}" text = f"Current field: {field.horizontal_index/100, field.vertical_index/100, field.state} Action: {decision}"
textsurface = myfont.render(text, False, (0, 0, 0)) textsurface = myfont.render(text, False, (0, 0, 0))
display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 100))) display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 300)))
text = f"Weather: {weather} Day Time: {day_time} Temperature: {temperature} Wind: {wind} Humidy: {humidy}" text = f"Weather: {weather} Day Time: {day_time} Temperature: {temperature} Wind: {wind} Humidy: {humidy}"
textsurface = myfont.render(text, False, (0, 0, 0)) textsurface = myfont.render(text, False, (0, 0, 0))
display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 50))) display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 250)))
def makeField(board, screen: pygame.Surface): def makeField(board, screen: pygame.Surface):

Binary file not shown.