aboutsummaryrefslogtreecommitdiff
path: root/TileBehaviorFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'TileBehaviorFactory.h')
-rw-r--r--TileBehaviorFactory.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/TileBehaviorFactory.h b/TileBehaviorFactory.h
index 33cd795..6167067 100644
--- a/TileBehaviorFactory.h
+++ b/TileBehaviorFactory.h
@@ -1,21 +1,16 @@
#pragma once
-#include <map>
#include <string>
+#include "Museum.h"
#include "TileBehavior.h"
class TileBehaviorFactory {
- typedef std::map<std::string, TileBehavior *> TileBehaviorCollection;
-
public:
- static TileBehavior & get_strategy(std::string);
- static void register_strategy(std::string, TileBehavior *);
+ TileBehaviorFactory(Museum & m);
+ std::unique_ptr<TileBehavior> create(std::string);
private:
- static TileBehaviorCollection & get_collection() {
- static TileBehaviorCollection c = {};
- return c;
- }
+ Museum & museum;
};