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: Gameengine/Gameengine.h
- Revision:
- 29:d85886364643
- Child:
- 31:ed5f7f15a1ed
- Child:
- 32:5dc769ba4a58
diff -r e73dd64ef334 -r d85886364643 Gameengine/Gameengine.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Gameengine/Gameengine.h Wed Apr 10 00:50:14 2019 +0000
@@ -0,0 +1,45 @@
+#ifndef GAMEENGINE_H
+#define GAMEENGINE_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "Miner.h"
+#include "Level1.h"
+#include "Levelengine.h"
+
+class Gameengine
+{
+
+public:
+
+ Gameengine();
+ ~Gameengine();
+ //void get_miner_pos();
+ void read_direction(Gamepad &pad);
+ void update(N5110 &lcd, Gamepad &pad);
+ void game_init();
+ void draw(Key _k, N5110 &lcd, Gamepad &pad);
+ void lose_life(N5110 &lcd);
+ bool game_over();
+ void next_level(N5110 &lcd);
+
+private:
+
+ int _level_select;
+ int _lives;
+ double _x;
+ double _y;
+ int _distance;
+ int _turn_flag;
+ int _counter;
+
+ Miner _miner;
+ Direction _d;
+ Level1 _l1;
+ Timer t;
+ Levelengine _level;
+ Key _k;
+
+};
+#endif
\ No newline at end of file