diff options
Diffstat (limited to 'Tile.cpp')
-rw-r--r-- | Tile.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1,12 +1,19 @@ #include <cstdio> #include "Tile.h" +#include "TileAppearance.h" Tile::Tile() { this->data = {}; + this->update(); } Tile::Tile(TileData data) { this->data = data; + this->update(); +} + +void Tile::update() { + this->color = TileAppearance::get_color(this->data.type); } |