#pragma once #include #include "CanvasData.h" #include "Tile.h" class Canvas { public: Canvas() = default; virtual ~Canvas(); public: virtual Tile & get_tile(unsigned x, unsigned y); virtual void set_tile(unsigned x, unsigned y, TileData data); public: CanvasData data; void update(); private: std::vector tiles; private: size_t pos_to_index(unsigned x, unsigned y); };