Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Revision:
8:dd1037c5435b
Parent:
7:0af4ced868f5
Child:
11:ab578a151f67
--- a/GameEngine/GameEngine.h	Sat Apr 18 16:36:52 2020 +0000
+++ b/GameEngine/GameEngine.h	Sun Apr 19 17:46:57 2020 +0000
@@ -5,12 +5,15 @@
 #include "mbed.h"
 #include "N5110.h"
 #include "Gamepad.h"
+#include "Spaceship.h"
+#include "Map.h"
  
-/** Spaceship class
-@brief Draws and moves spaceship
+/** Game Engine class
+@brief Runs the different parts of the game 
 @author Benjamin Evans, University of Leeds
 @date April 2020
 */
+
  
 class GameEngine {
     public:
@@ -20,13 +23,23 @@
         /** Destructor */
         ~GameEngine();
         
-        /** Initalises Spaceship */
-        void init();
+        /** Initalises GameEngine 
+        * @param lcd object, map object ,spaceship object, 
+        */
+        void init(N5110 &lcd, Spaceship &spaceship, Map &map, Gamepad &pad,AnalogIn &adc);
         
-    
+        /** Main gameplay loop that runs playable part of game
+        * @param lcd object, map object ,spaceship object, potentiometer object, pad object, potentiometer object
+        */
+        void gameplay_loop(N5110 &lcd, Spaceship &spaceship, Map &map, Gamepad &pad, AnalogIn &pot_1);
         
+        /** Moves map with spaceship movment
+        * @param spaceship object, gampad object, 
+        */
+        void map_movement(Spaceship &spaceship, Gamepad &pad);
+          
     private:
-   
+    int move_map_;
 };
  
 #endif
\ No newline at end of file