menage coments

This commit is contained in:
Maciej Sobkowiak 2019-06-09 23:23:00 +02:00
parent ed36703151
commit 83838ac87e
2 changed files with 4 additions and 8 deletions

View File

@ -48,8 +48,7 @@ class Grid:
for index, x in enumerate(day): for index, x in enumerate(day):
if index != 0 and index != 1: if index != 0 and index != 1:
garbage.append(x) garbage.append(x)
print(garbage) print("\n Today is:", day[1], ", garbage to collect: ",end = '')
print("Today is:", day[1], ", garbage to collect: ",end = '')
for x in garbage: for x in garbage:
print(x[2],", ",end='') print(x[2],", ",end='')
field_types.append(x[0]) field_types.append(x[0])
@ -153,7 +152,6 @@ class Node:
self.field_type = field_type self.field_type = field_type
self.house = House() self.house = House()
self.house.generate_trash() self.house.generate_trash()
print(self.house.trash,self.house.trash_file)

View File

@ -51,14 +51,12 @@ class Window():
to_collect = [] to_collect = []
for x in garbage: for x in garbage:
to_collect.extend(grid.get_trash_possition(x)) to_collect.extend(grid.get_trash_possition(x))
print("\n",len(to_collect)," garbage to collect.") print("\n",len(to_collect)," garbage to collect.\n")
print(to_collect)
#sort list of tuples to get minimum distance betwen all of them #sort list of tuples to get minimum distance betwen all of them
#fajnie jakby sie udalo to zrobic wydajniej ale narazie niech bedzie tak #fajnie jakby sie udalo to zrobic wydajniej ale narazie niech bedzie tak
#dzielimy plansze na 4 cwiartki #dzielimy plansze na 4 cwiartki
to_collect_sorted = [] to_collect_sorted = []
q = [[],[],[],[]] q = [[],[],[],[]]
for point in to_collect: for point in to_collect: