aboutsummaryrefslogtreecommitdiff
path: root/Tile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tile.cpp')
-rw-r--r--Tile.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tile.cpp b/Tile.cpp
index 230bd36..fd33423 100644
--- a/Tile.cpp
+++ b/Tile.cpp
@@ -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);
}