blob: 7c5b0808148fdb6c044e327c4417c529609343bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#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;
}
|