Alexandra Posta / Mbed OS ELEC2645_Race_Collision

Dependencies:   ELEC2645_JoystickLCD_LPC1768_2021

Revision:
8:1fc5e14b0db6
Parent:
1:2ae7a8b01771
Child:
9:6f060f495536
--- a/lib/GameEngine.h	Thu Apr 22 16:33:42 2021 +0000
+++ b/lib/GameEngine.h	Sat Apr 24 21:31:19 2021 +0000
@@ -0,0 +1,27 @@
+#ifndef GAMEENGINE_H
+#define GAMEENGINE_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Ball.h"
+#include "Utils.h"
+#include "Road.h"
+#include "Car.h"
+#include "Vector.h"
+
+class GameEngine {
+    public:
+        GameEngine();  // pass in the lcd object from the main file
+        void init(int paddle_position,int paddle_height,int paddle_width,int ball_size,int speed);
+        int update(UserInput input);
+        void sign(N5110 &lcd, Road &road);
+        void draw(N5110 &lcd);
+    private:
+        void check_collision();
+        void generate_ball();
+        void generate_road();
+        Ball _ball;
+        Road _road;
+};
+
+#endif
\ No newline at end of file