#ifndef ___MAP_COLORING___ #define ___MAP_COLORING___ #include const int max_MAP_SIZE = 10; enum theColors {red, green, blue, yellow, none}; class color { private: theColors hue; public: color() { hue = none; } color(theColors c) { hue = c; } bool operator==(color c) { return (hue == c.hue); } color& operator++ () { color* h = new color((theColors)((int)hue + 1)); return *h; } friend std::ostream& operator<<(std::ostream& out, color c); }; class map { private: bool neighbor[max_MAP_SIZE][max_MAP_SIZE]; color coloring[max_MAP_SIZE]; public: int numOfCountries; map(); bool isValidColoring(int country, color c); void colorCountry(int country, color c) { coloring[country] = c; } friend std::istream& operator>> (std::istream& in, map& m); friend std::ostream& operator<< (std::ostream& out, map& m); }; #endif