text: #include "graphedge.h"
  #include "graphnode.h"
  
  GraphNode::GraphNode(int id)
  {
      _id = id;
  }
  
  GraphNode::~GraphNode()
  {
      //// STUDENT CODE
      ////
  
  //    delete _chatBot;
  //    _chatBot = nullptr;
      ////
      //// EOF STUDENT CODE
  }
  
  void GraphNode::AddToken(std::string token)
  {
      _answers.push_back(token);
  }
  
  void GraphNode::AddEdgeToParentNode(GraphEdge *edge)
  {
      _parentEdges.push_back(edge);
  }
  
  void GraphNode::AddEdgeToChildNode(std::unique_ptr<GraphEdge>& edge)
  //void GraphNode::AddEdgeToChildNode(std::unique_ptr<GraphEdge> edge)
  {
      _childEdges.emplace_back(std::move(edge));
  }
  
  //// STUDENT CODE
  ////
  
  void GraphNode::MoveChatbotHere(ChatBot chatbot)
  {
      _chatBot = std::move(chatbot);
      _chatBot.SetCurrentNode(this);
  //    chatbot = nullptr;
  }
  
  void GraphNode::MoveChatbotToNewNode(GraphNode *newNode)
  {
  //    newNode->MoveChatbotHere(_chatBot);
      newNode->MoveChatbotHere(std::move(_chatBot));
  
  //    _chatBot = nullptr; // invalidate pointer at source
  }
  ////
  //// EOF STUDENT CODE
  
  GraphEdge *GraphNode::GetChildEdgeAtIndex(int index)
  {
      //// STUDENT CODE
      ////
  
      return _childEdges[index].get();
  
      ////
      //// EOF STUDENT CODE
  }