Ejemplo n.º 1
0
//judge the edge has existed or not
bool Field::existEdge(Node* a, Node* b) {
  std::pair <Node, Node> tempedge = std::make_pair (*a, *b);
  int i;
  for (i = 0; i < m_player_amount; i++) {
    for (std::pair <Node, Node> p_edge: m_alledges[i]) {
      if (isSameEdge(tempedge, p_edge)) {
        return true;
      }
    }
  }
  return false;
}
Ejemplo n.º 2
0
 bool BaseEdge::operator==(const BaseEdge& edge) const
 {
     return isSameEdge(edge);
 }