From 277157b3e06b2deeacbdbc8bf6190de19f88169d Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 23 Oct 2024 16:09:47 +0200 Subject: more refactoring / preparation for pathfinding --- Tile.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Tile.cpp') diff --git a/Tile.cpp b/Tile.cpp index 5172c24..cd1e820 100644 --- a/Tile.cpp +++ b/Tile.cpp @@ -18,8 +18,10 @@ 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(this->museum).create(this->data.type); + + Canvas & canvas = this->museum.canvas; + this->color = canvas.tile_color.get_color(this->data.type); + this->behavior = canvas.tile_behavior.create(this->data.type); } void Tile::update() { -- cgit v1.2.3