This commit is contained in:
Wojciech Łukasik 2020-06-09 21:58:59 +02:00
parent aaab950f95
commit 3b2166866a
8 changed files with 9 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View File

@ -3,13 +3,16 @@ from settings import Settings
from field import Field from field import Field
settings = Settings() settings = Settings()
#(250, 650), (250, 750)
def create_board(screen): def create_board(screen):
board = [] board = []
shelfs = [(250, 150), (250, 250), (450, 150), (450, 250), (650, 150), (650, 250), (850, 150), (850, 250), shelfs = [
(250, 450), (350, 450), (750, 450), (850, 450), (50, 50), (150, 50), (450, 50), (550, 50), (850, 50), (950, 50),
(250, 650), (250, 750), (450, 650), (450, 750), (650, 650), (650, 750), (850, 650), (850, 750)] (250, 250), (350, 250), (650, 250), (750, 250),
(50, 450), (150, 450), (450, 450), (550, 450), (850, 450), (950, 450),
(250, 650), (350, 650), (650, 650), (750, 650)
]
for y in range(settings.y_fields): for y in range(settings.y_fields):
row = [] row = []

View File

@ -64,7 +64,7 @@ def code_shape(shape):
def create_image(product): def create_image(product):
string = code_color(product.color) + code_shape(product.shape) + code_mass(product.mass) + \ string = code_color(product.color) + code_shape(product.shape) + code_mass(product.mass) + \
code_shape(product.shape) + code_price(product.price) code_size(product.size) + code_price(product.price)
print(string) print(string)
img = Image.new('RGB', (560, 112), color='white') img = Image.new('RGB', (560, 112), color='white')
d = ImageDraw.Draw(img) d = ImageDraw.Draw(img)

BIN
img/codes/Góralki.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
img/codes/Kinder-bueno.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -20,7 +20,7 @@ def run():
settings = Settings() settings = Settings()
screen = pygame.display.set_mode((settings.screen_width, settings.screen_height)) screen = pygame.display.set_mode((settings.screen_width, settings.screen_height))
pygame.display.set_caption("Inteligentny wózek widłowy") pygame.display.set_caption("Inteligentny wózek widłowy")
agent = Agent(screen, 550, 450, "Down") agent = Agent(screen, 950, 950, "Left")
board = create_board(screen) board = create_board(screen)
my_tree = decision_tree.build_tree(data.learning_data) my_tree = decision_tree.build_tree(data.learning_data)
products_from_supply = [] products_from_supply = []