aboutsummaryrefslogtreecommitdiff
path: root/Tile.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 /Tile.cpp
parent4cb7ca42003c177e3acc80075d7594e555966106 (diff)
fix more design
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;