#include "TileColorFactory.h" using namespace std; Color TileColorFactory::get_color(string type) { auto & type_map = TileColorFactory::get_collection(); if (type_map.contains(type)) return type_map.at(type); return TileColorFactory::default_color; } void TileColorFactory::register_color(string type, Color color) { auto & type_map = TileColorFactory::get_collection(); type_map[type] = color; }