#pragma once #include #include #include "CanvasData.h" #include "Tile.h" #include "XY.h" #include "TileBehaviorFactory.h" #include "TileColorFactory.h" class Museum; class Canvas { public: Canvas(Museum &); virtual ~Canvas(); std::string to_string(bool truecolor = false); public: virtual Tile & get_tile(const XY &); virtual void set_tile(TileData data); public: CanvasData data; void update(); void set_data(CanvasData data); public: TileColorFactory tile_color; TileBehaviorFactory tile_behavior; private: void update_steps(); void update_tiles(); private: std::vector tiles; virtual Tile * & get_tile_unsafe(const XY &); private: Museum & museum; };