This commit is contained in:
Wojciech Łukasik 2020-05-19 22:21:13 +02:00
parent 4853b973b6
commit abf5829c34
5 changed files with 3 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View File

@ -40,7 +40,7 @@ learning_data = [
['gold', 'rectangle', 40, 'medium', 'Twix'],
['gold', 'rectangle', 50, 'medium', 'Prince-polo'],
['brown', 'rectangle', 55, 'medium', 'Snickers'],
['brown', 'rectangle', 45, 'medium', 'Lion'],
['brown', 'rectangle', 45, 'medium', 'Lion'],
['white', 'rectangle', 40, 'medium', 'Kinder-bueno'],
['red', 'rectangle', 50, 'medium', 'Kit-kat'],
['blue', 'rectangle', 115, 'big', 'Wedel'],

View File

@ -33,7 +33,6 @@ class Field:
self.rect.center = (center_x, center_y)
# Metoda do wyświetlania pola na ekranie
def blitme(self):
self.screen.blit(self.image, self.rect)
@ -49,5 +48,5 @@ class Field:
self.neighbors.append(board[self.y + 1][self.x])
def addShelf(self):
shelf = Shelf(len(self.shelves)+1)
self.shelves.append(shelf)
shelf = Shelf(len(self.shelves) + 1)
self.shelves.append(shelf)

View File

@ -46,7 +46,6 @@ def run():
elif event.key == pygame.K_SPACE:
board[9][0].item = choice(data.learning_data)
print("Wybrano: " + board[9][0].item[-1])
board[9][0].item[-1] = 'Something'
field = board[9][0]
if not field.is_shelf:
path = functions.a_star(board[agent.y][agent.x], field, board)