diff --git a/constants.py b/constants.py index a0880c9..c6ca0fc 100644 --- a/constants.py +++ b/constants.py @@ -4,14 +4,14 @@ from math import ceil, floor DISPLAY_SIZE_HORIZONTAL = 1600 -DISPLAY_SIZE_VERTICAL = 1000 +DISPLAY_SIZE_VERTICAL = 800 #TILE DIVIDER = TILE SIZE TILE_SIZE = 100 # number of tiles HORIZONTAL_TILES_NUMBER = floor((DISPLAY_SIZE_HORIZONTAL)/TILE_SIZE) -VERTICAL_TILES_NUMBER = floor((DISPLAY_SIZE_VERTICAL-400)/TILE_SIZE) +VERTICAL_TILES_NUMBER = floor((DISPLAY_SIZE_VERTICAL-200)/TILE_SIZE) #TILE_SIZE diff --git a/createNeuralNetworkDatabase.py b/createNeuralNetworkDatabase.py index 24fcf92..aff7202 100644 --- a/createNeuralNetworkDatabase.py +++ b/createNeuralNetworkDatabase.py @@ -37,6 +37,3 @@ dict = { 'beetroots': training_data_beetroot, 'potatoes': training_data_potatoes } - -print(dict) -np.save(os.path.join('neural_network','dataset'), np.array(dict)) \ No newline at end of file diff --git a/drawUI.py b/drawUI.py index 1a73346..2d50605 100644 --- a/drawUI.py +++ b/drawUI.py @@ -29,21 +29,21 @@ def drawInfo(display, tractor, tillageUnit, field, direction, weather, day_time, else: decision = "Make Action" - 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: {round(tractor.fuel_tank,1)}" textsurface = myfont.render(text, False, (0, 0, 0)) - display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 400))) + display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 200))) text = f"(E)Tillage Unit Load: {tillageUnit.load} (^) Direction: {direction}" textsurface = myfont.render(text, False, (0, 0, 0)) - display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 350))) + display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 150))) text = f"Current field: {field.horizontal_index/100, field.vertical_index/100, field.state} Action: {decision}" textsurface = myfont.render(text, False, (0, 0, 0)) - display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 300))) + display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 100))) text = f"Weather: {weather} Day Time: {day_time} Temperature: {temperature} Wind: {wind} Humidy: {humidy}" textsurface = myfont.render(text, False, (0, 0, 0)) - display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 250))) + display.blit(textsurface, (50, (DISPLAY_SIZE_VERTICAL - 50))) def makeField(board, screen: pygame.Surface):