diff options
Diffstat (limited to 'Tile.cpp')
-rw-r--r-- | Tile.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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; |