diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-21 14:02:34 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-21 14:02:34 +0200 |
commit | fe8f7273f0efdfe319a0d3e3b2fc2847992745af (patch) | |
tree | 9f56560c8a35c3e281881fa48cd79b26f8e8de7e /Tile.cpp | |
parent | 4cb7ca42003c177e3acc80075d7594e555966106 (diff) |
fix more design
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; |