code review
This commit is contained in:
parent
07ff61b1dd
commit
053e225135
@ -21,8 +21,6 @@ def APath(table, start, end):
|
|||||||
start_node.g = start_node.h = start_node.f = 0
|
start_node.g = start_node.h = start_node.f = 0
|
||||||
end_node = AStarNode(None, end)
|
end_node = AStarNode(None, end)
|
||||||
end_node.g = end_node.h = end_node.f = 0
|
end_node.g = end_node.h = end_node.f = 0
|
||||||
|
|
||||||
# Initialize both open and closed list
|
|
||||||
open_list = []
|
open_list = []
|
||||||
closed_list = []
|
closed_list = []
|
||||||
|
|
||||||
|
@ -41,11 +41,9 @@ class Window():
|
|||||||
|
|
||||||
#copy table
|
#copy table
|
||||||
array = [[self.grid.table[col][row] for row in range(cols)] for col in range(rows)]
|
array = [[self.grid.table[col][row] for row in range(cols)] for col in range(rows)]
|
||||||
|
|
||||||
|
|
||||||
path = APath(array,(0,0),(19,19))
|
path = APath(array,(0,0),(19,19))
|
||||||
print(path,"\n\n")
|
|
||||||
|
|
||||||
|
#draw movement of garbage truck
|
||||||
for index, t in enumerate(path):
|
for index, t in enumerate(path):
|
||||||
x,y =t
|
x,y =t
|
||||||
if index != 0:
|
if index != 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user