Adam Baker 201166301

Dependencies:   mbed Gamepad N5110

Revision:
38:51ed5820ffe5
Parent:
36:6f452777b9ce
Child:
41:4b20f909bbcb
--- a/BlockheadEngine/BlockheadEngine.h	Sun May 05 17:34:55 2019 +0000
+++ b/BlockheadEngine/BlockheadEngine.h	Mon May 06 14:08:31 2019 +0000
@@ -4,35 +4,64 @@
 #include "mbed.h"
 #include "Gamepad.h"
 #include "N5110.h"
-#include "Runner.h"
+#include "Blockhead.h"
 #include "Levels.h"
 #include "Animation.h"
 
+/** BlockheadEngine Class
+ * @brief Class for controlling the main mechanics Blockhead character
+ * @author Adam P. Baker
+ */
 
 class BlockheadEngine
 {
     
 public:
+    /**
+    *@brief Constructor
+    */
+    BlockheadEngine();
     
-    BlockheadEngine();
+    /**
+    *@brief Deconstructor
+    */
     ~BlockheadEngine();
     
+    /**
+    *@brief Initialises variables in blockhead class and level class and _pos struct.
+    */
     void init();
+    
+    /**
+    *@brief Intialises variables in blockhead class and level class and _pos struck (except level number which it keeps the same)
+    */
     void continueInit();
+    
+    /**
+    *@brief runs the game 'blockhead'
+    *@param lcd @brief class which controlls lcd screen
+    *@param pad @breif class for working with the gamepad 
+    *@returns _gameover @brief (0 when blockhead alive, 1 once died)
+    */
     int playgame(N5110 &lcd, Gamepad &pad);
+    
+    /**
+    *@bried sets highscore if new highest level reached
+    *@retunrs _highscore
+    */
     int highscore();
     
 private:
 
-    Runner _runner;
-    Levels _lev;
+    Blockhead _blockhead;       //blockhead class
+    Levels _lev;                //levels class
     
-    Pos _pos;
+    Pos _pos;                   //_pos struct
 
 
-    int _gameover;
-    int _level;
-    int _highscore;
+    int _gameover;              //_gameover flag (0 when alive, 1 onnce died)
+    int _level;                 //what level blockhead is on
+    int _highscore;             //highest level reached
 };
 
 #endif
\ No newline at end of file