aboutsummaryrefslogtreecommitdiff
path: root/DeleteArtistTileBehavior.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-21 14:02:34 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-21 14:02:34 +0200
commitfe8f7273f0efdfe319a0d3e3b2fc2847992745af (patch)
tree9f56560c8a35c3e281881fa48cd79b26f8e8de7e /DeleteArtistTileBehavior.cpp
parent4cb7ca42003c177e3acc80075d7594e555966106 (diff)
fix more design
Diffstat (limited to 'DeleteArtistTileBehavior.cpp')
-rw-r--r--DeleteArtistTileBehavior.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/DeleteArtistTileBehavior.cpp b/DeleteArtistTileBehavior.cpp
index 091a251..71cc20e 100644
--- a/DeleteArtistTileBehavior.cpp
+++ b/DeleteArtistTileBehavior.cpp
@@ -1,5 +1,3 @@
-#include <memory>
-
#include "DeleteArtistTileBehavior.h"
#include "SetNeighborTileBehavior.h"
#include "Tile.h"
@@ -7,12 +5,10 @@
using namespace std;
-DeleteArtistTileBehavior DeleteArtistTileBehavior::instance { DeleteArtistTileBehavior::type };
-
void DeleteArtistTileBehavior::step(Artist * artist) {
this->interactions++;
if (artist != nullptr)
- this->museum->people.remove_artist(*artist);
+ this->museum.people.remove_artist(*artist);
}
void DeleteArtistTileBehavior::update(Tile & tile) {
@@ -20,9 +16,3 @@ void DeleteArtistTileBehavior::update(Tile & tile) {
tile.set_type(SetNeighborTileBehavior::type);
}
-unique_ptr<TileBehavior> DeleteArtistTileBehavior::clone(Museum & museum) {
- auto instance = new DeleteArtistTileBehavior();
- instance->museum = &museum;
- return unique_ptr<TileBehavior>(instance);
-}
-