aboutsummaryrefslogtreecommitdiff
path: root/TileBehavior.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 15:43:25 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 15:43:25 +0200
commit76e61d68bbf568ec0d7fc4632e52d4de5496b003 (patch)
tree92a2dc9b12a542456bdc154f44deb34925883210 /TileBehavior.cpp
parent3f63576819151ff15237a9b4f0651c538cfef067 (diff)
(1/2) rename
Diffstat (limited to 'TileBehavior.cpp')
-rw-r--r--TileBehavior.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/TileBehavior.cpp b/TileBehavior.cpp
index 6cabd40..99301ac 100644
--- a/TileBehavior.cpp
+++ b/TileBehavior.cpp
@@ -1,10 +1,10 @@
-#include "TileBehavior.h"
+#include "TileBehaviorFactory.h"
#include "Exception.h"
using namespace std;
-TileBehaviorStrategy & TileBehavior::get_strategy(string type) {
- auto & type_map = TileBehavior::get_collection();
+TileBehavior & TileBehaviorFactory::get_strategy(string type) {
+ auto & type_map = TileBehaviorFactory::get_collection();
if (type_map.contains(type))
return *type_map.at(type);
@@ -12,8 +12,8 @@ TileBehaviorStrategy & TileBehavior::get_strategy(string type) {
throw Exception("unknown behavior for tile type \"%s\"", type.c_str());
}
-void TileBehavior::register_strategy(string type, TileBehaviorStrategy * strategy) {
- auto & type_map = TileBehavior::get_collection();
+void TileBehaviorFactory::register_strategy(string type, TileBehavior * strategy) {
+ auto & type_map = TileBehaviorFactory::get_collection();
type_map[type] = strategy;
}