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/engine.h
- Revision:
- 8:b3738229ba85
- Parent:
- 6:4c55dd4b6d42
- Child:
- 9:dc13042b09f5
diff -r 9e9424f5ec4b -r b3738229ba85 GameEngine/engine.h
--- a/GameEngine/engine.h Sat May 04 00:11:14 2019 +0000
+++ b/GameEngine/engine.h Sat May 04 22:46:31 2019 +0000
@@ -2,9 +2,32 @@
#ifndef ENGINE_H
#define ENGINE_H
-class engine{
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "functions.h"
+
+class Engine{
-
+ public:
+ Engine();
+ ~Engine();
+
+ void init(int screenHeight, int screenWidth, int speed);
+ void read_input(Gamepad &pad);
+ void update(Gamepad &pad, N5110 &lcd);
+ void draw(N5110 &lcd);
+
+ void setSpeed(int speed);
+
+ private:
+ int _speed;
+ int _screen_height;
+ int _screen_width;
+
+ static int car1[];
+ static int car2[];
+ static int car3[];
};
#endif
\ No newline at end of file