aboutsummaryrefslogtreecommitdiff
path: root/DeleteArtistTileBehavior.cpp
diff options
context:
space:
mode:
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);
-}
-