Guest User

Untitled

a guest
Apr 25th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. /// Summary: Computes the shortest path to a node
  2. private Triple<String, Integer, LinkedList<String>>
  3. p_ComputeShortestPathTo_WithLinkedList(String nodeTo)
  4. {
  5. // Have to use hack - Java no can has closures
  6. m_OurPosition_MayBe_OUT_OF_DATE = p_MakePosString(m_curX, m_curY);
  7. HashMap<String, Tuple<Integer, String>> augmentedMap =
  8. p_ComputeSpanningTree_With_EndCondition_AndAddCondition(new AnonymousConditional_Single<String>(){
  9.  
  10. @Override
  11. public boolean checkCondition(String arg)
  12. {
  13. if (arg.equals(m_OurPosition_MayBe_OUT_OF_DATE))
  14. return true;
  15. else
  16. return false;
  17. }
  18.  
  19. }, null);
  20.  
  21. return p_ComputeTrailFrom_SpanningTree(nodeTo, augmentedMap);
  22. }
Add Comment
Please, Sign In to add comment