diff --git a/RouteFinding/05_tests.py b/RouteFinding/05_tests.py index f0b45c2..dd669d8 100644 --- a/RouteFinding/05_tests.py +++ b/RouteFinding/05_tests.py @@ -1,4 +1,6 @@ # Define Searcher, hSLD, SearchNode. +import DRDViz + class SearchNode: def __init__(self, label, value): self.label = label @@ -53,12 +55,18 @@ class Searcher: nodePaths[mapContents[nodeIter][1]][mapContents[nodeIter][0]] = mapContents[nodeIter][2] else: nodePaths[mapContents[nodeIter][1]][mapContents[nodeIter][0]] = mapContents[nodeIter][2] - - # print(nodeLoc) - print(nodePaths) + self.nodePaths = nodePaths + self.nodeLocs = nodeLoc + # need to get the myViz attribute by importing the DRDViz stuff. + self.myViz = DRDViz.DRDViz() + # now, start using the myViz thingy to 'display' a map. + def setStartGoal(self, startNode, endNode): + self.startNode = startNode + self.endNode = endNode # (b) Show your program loading in the 30-node sample file. -s=Searcher("30node.txt") +# s=Searcher("30node.txt") +s=Searcher("samplemap-1.txt") # (c) Show you program setting start node=U and end node=T. s.setStartGoal('U','T') # myViz should be a DRDViz instance -> save map to file on disk. diff --git a/RouteFinding/30node.png b/RouteFinding/30node.png new file mode 100644 index 0000000..17b4ea0 Binary files /dev/null and b/RouteFinding/30node.png differ