aboutsummaryrefslogtreecommitdiff
path: root/Tile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tile.cpp')
-rw-r--r--Tile.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Tile.cpp b/Tile.cpp
index f4fa623..5172c24 100644
--- a/Tile.cpp
+++ b/Tile.cpp
@@ -19,17 +19,13 @@ void Tile::set_type(const string & type) {
void Tile::set_data(TileData & data) {
this->data = data;
this->color = TileColorFactory::get_color(this->data.type);
- this->behavior = TileBehaviorFactory::get_strategy(this->data.type).clone(this->museum);
+ this->behavior = TileBehaviorFactory(this->museum).create(this->data.type);
}
void Tile::update() {
this->behavior->update(*this);
}
-void Tile::step(Artist * artist) {
- this->behavior->step(artist);
-}
-
Tile * Tile::get_neighbor(int dx, int dy) {
Canvas & canvas = this->museum.canvas;
int x = this->data.x + dx;