aboutsummaryrefslogtreecommitdiff
path: root/StepTileBehavior.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 15:48:14 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 15:48:14 +0200
commitd8289105193707daede1a5b59137f18e20f20aeb (patch)
tree939908b9c4c6f7aaef8aa61ee2e04be3e85610b6 /StepTileBehavior.cpp
parent76e61d68bbf568ec0d7fc4632e52d4de5496b003 (diff)
(2/2) rename
Diffstat (limited to 'StepTileBehavior.cpp')
-rw-r--r--StepTileBehavior.cpp21
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);
+}
+