summaryrefslogtreecommitdiff
path: root/src/train.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/train.h')
-rw-r--r--src/train.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/train.h b/src/train.h
new file mode 100644
index 0000000..ed0de94
--- /dev/null
+++ b/src/train.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "bitmap.h"
+
+enum CarDirection {
+ North,
+ East,
+ South,
+ West
+};
+
+class Level;
+
+class TrainCar {
+public:
+ TrainCar(int x, int y)
+ : x(x), y(y), m_sprite("../res/car.png") {}
+
+ void update(Level&);
+ void draw(Bitmap&, int, int);
+
+ int x, y;
+private:
+ Bitmap m_sprite;
+ int m_progress;
+ CarDirection m_dir;
+};