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 /StepTileBehavior.cpp | |
parent | 76e61d68bbf568ec0d7fc4632e52d4de5496b003 (diff) |
(2/2) rename
Diffstat (limited to 'StepTileBehavior.cpp')
-rw-r--r-- | StepTileBehavior.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/StepTileBehavior.cpp b/StepTileBehavior.cpp new file mode 100644 index 0000000..2023bb8 --- /dev/null +++ b/StepTileBehavior.cpp @@ -0,0 +1,21 @@ +#include <memory> + +#include "StepTileBehavior.h" +#include "DeleteArtistTileBehavior.h" +#include "Tile.h" + +using namespace std; + +StepTileBehavior StepTileBehavior::instance { StepTileBehavior::type }; + +void StepTileBehavior::update(Tile & tile) { + if (this->interactions < 3) return; + tile.set_type(DeleteArtistTileBehavior::type); +} + +unique_ptr<TileBehavior> StepTileBehavior::clone(Museum & museum) { + auto instance = new StepTileBehavior(); + instance->museum = &museum; + return unique_ptr<TileBehavior>(instance); +} + |