Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Minerengine/Miner.h
- Revision:
- 27:e73dd64ef334
diff -r bce40bf4c9fc -r e73dd64ef334 Minerengine/Miner.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Minerengine/Miner.h Tue Apr 09 18:46:14 2019 +0000
@@ -0,0 +1,57 @@
+#ifndef MINER_H
+#define MINER_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+
+const int miner_right[24] = {
+ 1,1,1,
+ 1,1,0,
+ 1,1,1,
+ 0,1,0,
+ 1,1,1,
+ 1,1,1,
+ 0,1,0,
+ 0,1,1,
+
+ };
+
+ const int miner_left[24] = {
+ 1,1,1,
+ 0,1,1,
+ 1,1,1,
+ 0,1,0,
+ 1,1,1,
+ 1,1,1,
+ 0,1,0,
+ 1,1,0,
+ };
+
+
+class Miner
+{
+
+public:
+
+ Miner();
+ ~Miner();
+
+ void miner_init(int x, int y);
+ void miner_move(Direction d, N5110 &lcd);
+ void miner_draw(N5110 &lcd);
+ void miner_gravity(N5110 &lcd);
+ void miner_jump(N5110 &lcd, Gamepad &pad);
+ void miner_land(N5110 &lcd);
+ Vector2D get_pos();
+
+private:
+
+ int _direction;
+ int _gravity;
+ int _jump;
+ int _y;
+ int _x;
+
+};
+#endif
\ No newline at end of file