From 809ab043b7f11f2912f845553d146a06b4fd2ba1 Mon Sep 17 00:00:00 2001 From: secret_dude Date: Tue, 22 Jun 2021 23:12:13 +0200 Subject: [PATCH] FINAL --- constants.py | 4 ++-- createNeuralNetworkDatabase.py | 3 --- drawUI.py | 10 +++++----- 3 files changed, 7 insertions(+), 10 deletions(-) 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):