#ifndef city_h_
#define city_h_

// A City object stores its name and a vector of pointers to other
// City objects that it is linked to.  The links are bidirectional,
// which means that if city A is linked to city B then city B should
// also be linked to city A.

#include <vector>
#include <string>

using namespace std;

class City {

public:
  City(const string& name) : m_name(name) {}
  
  // ACCESSORS
  const string& name() const { return m_name; }
  const vector<City*>& get_neighbors() const { return m_neighbors; }
  bool is_neighbor(City* city) const;

  // MODIFIERS
  bool add_neighbor(City* city);
  bool remove_neighbor(City* city);

  // Tell the neighboring cities to remove this City* from its vector of neighbors.
  void remove_city_from_its_neighbors();

private: 
  // REPRESENTATION
  string m_name;
  vector<City*> m_neighbors;
};

bool city_sorter(City* city1, City * city2);

#endif

