Guest User

Untitled

a guest
Apr 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. Node&           Astar::createNode(board_t& board)
  2. {
  3.     Node* newNode = new Node();
  4.  
  5.     newNode->board  = board;
  6.     newNode->cost   = Manhattan::sum(board, this->goal);
  7.    
  8.     std::cout << &newNode << std::endl;
  9.    
  10.     return *newNode;
  11. }
  12.  
  13. void            Astar::startNode(void)
  14. {
  15.    
  16.     Node& currentNode   = this->createNode(this->board);
  17.     currentNode.cost    = Manhattan::sum(this->board, this->goal);
  18.     std::cout << &currentNode << std::endl;
  19.     /*
  20.     this->close.push_front(currentNode);
  21.     std::cout << &this->close.begin() << std::endl;
  22.     */
  23. }
Add Comment
Please, Sign In to add comment