aboutsummaryrefslogtreecommitdiff
path: root/TileColorFactory.cpp
blob: 22738f65012d602a05dd08605b53ab564738ea08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "TileColorFactory.h"

using namespace std;

const Color & TileColorFactory::get_color(const string & type) {
	if (this->collection.contains(type))
		return this->collection.at(type);
	
	return TileColorFactory::default_color;
}

void TileColorFactory::register_color(const string & type, const Color & color) {
	this->collection[type] = color;
}