vap38 / CS435_Project2

Project 2 for CS435
0 stars 0 forks source link

comment #10 #10

Closed Iqbal-khan07 closed 4 years ago

Iqbal-khan07 commented 4 years ago

` if tempNode is destNode:

            optimalPath.insert(0,tempNode)
            pNode = tempNode.pNode
            while pNode:
                optimalPath.insert(0, pNode)
                pNode = pNode.pNode
            break

` this code should be outside of while loop. Since path is calculated when the search has been done https://github.com/vap38/CS435_Project2/blob/c69f244b05592c79d575ca071ef73700042a28e5/aStar/GridGraph.py#L135

vap38 commented 4 years ago

With my logic, it is necessary for me to check in that manner otherwise, the entire method does not give the correct path