diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-18 15:48:14 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-18 15:48:14 +0200 |
commit | d8289105193707daede1a5b59137f18e20f20aeb (patch) | |
tree | 939908b9c4c6f7aaef8aa61ee2e04be3e85610b6 /TileBehavior.h | |
parent | 76e61d68bbf568ec0d7fc4632e52d4de5496b003 (diff) |
(2/2) rename
Diffstat (limited to 'TileBehavior.h')
-rw-r--r-- | TileBehavior.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/TileBehavior.h b/TileBehavior.h index 33cd795..b79e7f5 100644 --- a/TileBehavior.h +++ b/TileBehavior.h @@ -1,21 +1,24 @@ #pragma once -#include <map> #include <string> +#include <memory> -#include "TileBehavior.h" - -class TileBehaviorFactory { - typedef std::map<std::string, TileBehavior *> TileBehaviorCollection; +class Tile; +class Museum; +class Artist; +class TileBehavior { public: - static TileBehavior & get_strategy(std::string); - static void register_strategy(std::string, TileBehavior *); + virtual void step(Artist *); + virtual void update(Tile &) = 0; + virtual std::unique_ptr<TileBehavior> clone(Museum & m) = 0; + +protected: + TileBehavior(const std::string type); + TileBehavior() = default; -private: - static TileBehaviorCollection & get_collection() { - static TileBehaviorCollection c = {}; - return c; - } +protected: + unsigned int interactions = 0; + Museum * museum = nullptr; }; |