Update ailab1.cpp

created a getNode() type function, for the a* algorithm