aboutsummaryrefslogtreecommitdiff
path: root/TileColorFactory.cpp
blob: 124397abddcec77c9a0e8323c064229b1fbda40d (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;
}