aboutsummaryrefslogtreecommitdiff
path: root/TileDecayCommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TileDecayCommand.cpp')
-rw-r--r--TileDecayCommand.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/TileDecayCommand.cpp b/TileDecayCommand.cpp
new file mode 100644
index 0000000..9497121
--- /dev/null
+++ b/TileDecayCommand.cpp
@@ -0,0 +1,10 @@
+#include "TileDecayCommand.h"
+#include "Museum.h"
+
+void TileDecayCommand::execute(unsigned int x, unsigned int y) {
+ Museum & museum = this->get_museum();
+ if (x >= museum.canvas.data.columns) return;
+ if (y >= museum.canvas.data.rows) return;
+ museum.canvas.get_tile(x, y).step(nullptr);
+}
+